Prepared SQL Statement Syntax

Source: Internet
Author: User
Tags pow prepare

Http://dev.mysql.com/doc/refman/5.7/en/sql-syntax-prepared-statements.html

1 CREATE TABLET1 (AINT  not NULL);2 INSERT  intoT1VALUES(4), (8), ( One), ( +), ( the);3 SET @table = 'T1';4 SET @s =CONCAT ('SELECT * from',@table);5 PREPAREStmt3 from @s;6 EXECUTESTMT3;

1 SET @s = 'SELECT SQRT (Pow (?, 2) + POW (?, 2)) as Hypotenuse';2 PREPAREStmt2 from @s;3 SET @a = 6;4 SET @b = 8;5 EXECUTEStmt2 USING@a,@b;

1 PREPAREStmt1 from 'SELECT SQRT (Pow (?, 2) + POW (?, 2)) as Hypotenuse';2 SET @a = 3;3 SET @b = 4;4 EXECUTESTMT1 USING@a,@b;5SHOW VARIABLES like '%a%';

Prepared SQL Statement Syntax

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.