Mimer SQL Documentation TOC PREV NEXT INDEX

Mimer SQL Developer Site


EXECUTE IMMEDIATE


Prepares and executes a dynamically submitted SQL statement.



Usage

Embedded.

Description

The SQL source statement contained in the host variable is prepared and executed.

For a fuller discussion of the use of EXECUTE statements in dynamic application programs, see the Mimer SQL Programmer's Manual, Dynamic SQL.

Restrictions

The EXECUTE IMMEDIATE statement may only be used for dynamically submitted statements with no parameter markers.

Dynamically submitted SELECT statements may not be executed with EXECUTE IMMEDIATE, these should be performed using a sequence of OPEN, FETCH and CLOSE statements.

Note: You can use singleton SELECT statements or calls to result set procedures if the result set will contain only one row.

Example

 strcpy(sqlstr,"DELETE FROM sometable WHERE id IS NULL");
 exec sql EXECUTE IMMEDIATE :sqlstr;
 

For more information, see the Mimer SQL Programmer's Manual, Executable Statements.

Standard Compliance

Standard
Compliance
Comments
SQL-2011
Features outside core
Feature B031, "Basic dynamic SQL".


Mimer
Mimer Information Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
info@mimer.se
Mimer SQL Documentation TOC PREV NEXT INDEX