dble-docs-cn/3.SQL_Syntax/3.3_Prepared_SQL_Syntax.md at master · java-han/dble-docs-cn · GitHub
Skip to content

Latest commit

 

History

History
33 lines (27 loc) · 432 Bytes

File metadata and controls

33 lines (27 loc) · 432 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;