Purpose
You can use this statement to execute a PREPARE statement.
Syntax
EXECUTE stmt_name
[USING @var_name [, @var_name] ...]
Parameters
| Parameter | Description |
|---|---|
| stmt_name | The name of the PREPARE statement. |
| @var_name | The variables sequentially filled in stmt_name. |
Examples
Execute a PREPARE statement.
obclient> PREPARE stmt1 FROM 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse';
Query OK, 0 rows affected (0.01 sec)
obclient> SET @a = 3;
Query OK, 0 rows affected (0.00 sec)
obclient> SET @b = 4;
Query OK, 0 rows affected (0.00 sec)
obclient> EXECUTE stmt1 USING @a, @b;
Query OK, 0 rows affected (0.00 sec)
Note
Currently, OceanBase Database does not display the results on interactive clients.