Table of Contents Previous Next


7 Reference : 7.5 ECPGPlus Statements : 7.5.17 EXECUTE IMMEDIATE

Use the EXECUTE IMMEDIATE statement to execute a string that contains a SQL command. The syntax is:
EXEC SQL [AT database_name] EXECUTE IMMEDIATE command_text;
database_name is the database identifier or a host variable that contains the database identifier. If you omit the AT clause, the statement will be executed on the current default database.
command_text is the command executed by the EXECUTE IMMEDIATE statement.
The following example executes the command contained in the :command_text host variable:

7 Reference : 7.5 ECPGPlus Statements : 7.5.17 EXECUTE IMMEDIATE

Table of Contents Previous Next