3.3 Prepared Statements

3.3.1 PREPARE Statement

完全兼容MySQL

PREPARE stmt_name FROM preparable_stmt

例:

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

3.3.2 EXECUTE Statement

完全兼容MySQL

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

例:

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

3.3.3 DEALLOCATE PREPARE Statement

完全兼容MySQL

{DEALLOCATE | DROP} PREPARE stmt_name

例:

DROP PREPARE stmt1;

results matching ""

    No results matching ""