Entering content frame

 EXECUTE Statement 

Use

Use the EXECUTE statement to execute a dynamic SQL statement with parameters.

Prerequisites

·        You have used the PREPARE statement to prepare the SQL statement for execution.

·        If you are using a descriptor, you have initialized it with the DESCRIBE statement.

Syntax

EXEC SQL [<session_spec>] [<for_clause>] EXECUTE <statement_name> [<using_clause>];

·        Specify <session_spec> , when you are working with multiple database sessions.

·        Use the USING clause to assign values to the parameters.

·        Use the FOR clause for array statements.

 

Leaving content frame