Skip to content

Latest commit

 

History

History
34 lines (27 loc) · 433 Bytes

3.3_Prepared_SQL_Syntax.md

File metadata and controls

34 lines (27 loc) · 433 Bytes

3.3 PREPARE SQL Syntax

3.3.1 PREPARE Syntax

PREPARE stmt_name FROM preparable_stmt

例:

prepare stmt1 from "select * from a_test where id=?";

3.3.2 EXECUTE Syntax

EXECUTE stmt_name
[USING @var_name [, @var_name] ...]

例:

SET @a = 1;
EXECUTE stmt1 USING @a;

3.3.3 DEALLOCATE PREPARE Syntax

{DEALLOCATE | DROP} PREPARE stmt_name

例:

DROP PREPARE stmt1;