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;

results matching ""

    No results matching ""