13.5.2 EXECUTE Statement语句

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

After preparing a statement with PREPARE, you execute it with an EXECUTE statement that refers to the prepared statement name. 使用PREPARE准备语句后,使用引用已准备语句名称的EXECUTE语句执行该语句。If the prepared statement contains any parameter markers, you must supply a USING clause that lists user variables containing the values to be bound to the parameters. 如果准备好的语句包含任何参数标记,则必须提供一个USING子句,列出包含要绑定到参数的值的用户变量。Parameter values can be supplied only by user variables, and the USING clause must name exactly as many variables as the number of parameter markers in the statement.参数值只能由用户变量提供,并且USING子句必须与语句中参数标记的数量一样精确地命名变量。

You can execute a given prepared statement multiple times, passing different variables to it or setting the variables to different values before each execution.您可以多次执行给定的准备好的语句,在每次执行之前向其传递不同的变量或将变量设置为不同的值。

For examples, see Section 13.5, “Prepared Statements”.例如,请参阅第13.5节,“准备好的声明”