Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.2.1 |  CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 

EXECUTE Statement


The EXECUTE statement executes the prepared statement. You can bind the data value after the USING clause if a bind parameter (?) is included in the prepared statement. You cannot specify user-defined variables like an attribute in the USING clause. An value such as literal and an input parameter only can be specified.


EXECUTE stmt_name [USING value [, value] …]

  • stmt_name : The name given to the prepared statement to be executed is specified. An error message is displayed if the stmt_name is not valid, or if the prepared statement does not exist.
  • value : The data to bind is specified if there is a bind parameter in the prepared statement. The number and the order of the data must correspond to that of the bind parameter. If it does not, an error message is displayed.





ERROR: A prepared statement with the name stmt1 does not exist.


--prepare and execute a statement


EXECUTE stmt2 USING '12345abcdeabcde',6,5;

EXECUTE stmt2 USING '12345abcdeabcde',6,10;



Current transaction has been committed.


=== <Result of SELECT Command in Line 1> ===


   mid( ?:0 ,  ?:1 ,  ?:2 )




=== <Result of SELECT Command in Line 2> ===


   mid( ?:0 ,  ?:1 ,  ?:2 )