You have the following options when you embed SQL statements in the source code of an application program:
The embedded statements consist of statements to the precompiler, and the actual statement that is sent to the database.
The key words EXEC SQL form the simplest precompiler statement. The static SQL statement EXEC SQL <statement> specifies that the database kernel executes the database statement <statement>.
This table gives you an overview of the precompiler statements and how they are used:
Cancels a running SQL statement |
|
Indicate declare sections |
|
Initializes a descriptor structure for a dynamic SQL statement |
|
Executes an operating system command |
|
Executes a dynamic SQL statement |
|
Calls a dynamic SQL statement without parameters |
|
Reads LONG columns piecewise |
|
Generates structure definitions |
|
Inserts file content in the source text |
|
Executes a dynamic SQL statement with named result table |
|
Prepares a dynamic SQL statement |
|
Inserts values in LONG columns piecewise |
|
Statement for connecting to the database instance |
|
Activates logging in a trace file |
|
Assigns parameter values in a dynamic SQL statement |
|
Displays the software version |
|
Calls actions with conditions |
See also: Syntax List, Working with Multiple Database Sessions, Compatibility with Other Database Systems
For the syntax of the database statements in the SQL mode INTERNAL, see the Reference Manual.