DECLARE STATEMENT
Go Up to Statement and Function Reference (Language Reference Guide)
Identifies dynamic SQL statements before they are prepared and executed in an embedded program. Available in gpre
.
DECLARE statement STATEMENT;
Argument | Description |
---|---|
<statement> |
Name of a SQL variable for a user-supplied SQL statement to prepare and execute at run time. |
Description: DECLARE STATEMENT
names a SQL variable for a user-supplied SQL statement to prepare and execute at run time. DECLARE STATEMENT
is not executed, so it does not produce run-time errors. The statement provides internal documentation.
Example: The following embedded SQL statement declares Q1 to be the name of a string for preparation and execution.
EXEC SQL
DECLARE Q1 STATEMENT;