EXECUTE
Description
This statement is used to execute a prepared statement.
Syntax
EXECUTE stmt_name
[USING @var_name [, @var_name] ...]
Parameters
| Parameter | Description |
|---|---|
| stmt_name | The name of the prepared statement. |
| @var_name | The variable to be filled in the stmt_name in sequence. |
Examples
Execute a prepared statement.
PREPARE stmt1 FROM 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse';
Query OK, 0 rows affected (0.001 sec)
SET @a = 3;
Query OK, 0 rows affected (0.001 sec)
SET @b = 4;
Query OK, 0 rows affected (0.001 sec)
EXECUTE stmt1 USING @a, @b;
Query OK, 0 rows affected (0.001 sec)
info
Currently, seekdb does not support interactive clients to explicitly show results.