7.5.14 EXECUTE

Table of Contents Previous Next



7.5.14 EXECUTE
Use the EXECUTE statement to execute a statement previously prepared using an EXEC SQL PREPARE statement. The syntax is:
EXEC SQL [FOR array_size] EXECUTE statement_name
[USING {DESCRIPTOR
SQLDA_descriptor
|:
host_variable [[INDICATOR] :indicator_variable]}];
array_size is an integer value or a host variable that contains an integer value that specifies the number of rows to be processed. If you omit the FOR clause, the statement is executed once for each member of the array.
statement_name specifies the name assigned to the statement when the statement was created (using the EXEC SQL PREPARE statement).
Include the USING clause to supply values for parameters within the prepared statement:
Include the DESCRIPTOR SQLDA_descriptor clause to provide an SQLDA descriptor value for a parameter.
Use a host_variable (and an optional indicator_variable) to provide a user-specified value for a parameter.


Table of Contents Previous Next