1 – compound-statement
A statement that can contain multiple SQL statements in an SQL
module procedure or in an embedded SQL procedure.
An embedded procedure that contains a compound statement is
called an embedded multistatement procedure. SQL supports a
restricted subset of SQL statements in a compound statement
embedded in a host langauge program. Refer to the Oracle Rdb
SQL Reference Manual for a list of valid SQL statements allowed
in a compound statement.
Compound statements can also include program-like, flow-
of-control statements (IF, LOOP, CASE, LEAVE), transaction
management statements (COMMIT and ROLLBACK), a variable
declaration statement (SET assignment), a cursor-processing
statement (FOR), and a procedure-debugging statement (TRACE).
See the Oracle Rdb SQL Reference Manual for a complete
description of a compound statement.
2 – ending-symbol
Ends an embedded simple or an embedded compound statement. To
end an embedded statement, follow the host language requirements
listed in the following table.
Table 5 Ending Embedded SQL Statements
Language Symbols to End EXEC SQL Statements
Ada Semicolon (;)
C Semicolon (;)
COBOL END-EXEC
FORTRAN Ending symbol not required
Pascal Semicolon (;)
PL/I Semicolon (;)
3 – EXEC_SQL
Prefixes each simple or compound statement. Converting
interactive statements to precompiled statements requires the
added step of starting each simple or compound statement with the
keywords EXEC SQL. SQL cannot process these statements otherwise.
Also, both keywords EXEC and SQL must be on the same line, and
you cannot insert comments between them.
4 – simple-statement
A statement that can contain a single SQL statement only. For a
list of SQL statements that are valid within a simple statement
and for a complete description of a simple statement, see the
Oracle Rdb SQL Reference Manual.