The Structure Of Procedures; Sql Statements Allowed In Procedures - Sybase Adaptive Server IQ 12.4.2 Administration And Performance Manual

Table of Contents

Advertisement

The structure of procedures

SQL statements allowed in procedures

The body of a procedure consists of a compound statement as discussed in
"Using compound statements" on page 240. A compound statement consists
of a BEGIN and an END, enclosing a set of SQL statements. The statements
must be separated by semicolons.
The SQL statements that can occur in procedures are described in "SQL
statements allowed in procedures" on page 243.
Procedures can contain control statements, which are described in "Control
statements" on page 239.
Almost all SQL statements are allowed within procedures, including the
following:
SELECT, UPDATE, DELETE, INSERT and SET VARIABLE.
The CALL statement to execute other procedures.
Control statements (see "SQL statements allowed in procedures" on page
243).
Cursor statements (see "Using cursors in procedures" on page 251).
Exception handling statements (see "Using exception handlers in
procedures" on page 261).
The EXECUTE IMMEDIATE statement.
Some SQL statements are not allowed within procedures. These include the
following:
CONNECT statement
DISCONNECT statement.
COMMIT, ROLLBACK and SAVEPOINT statements are allowed within
procedures with certain restrictions (see "Transactions and savepoints in
procedures").
For details, see the
Usage
Statements" in Adaptive Server IQ Reference Manual.
CHAPTER 6
Using Procedures and Batches
for each SQL statement in the chapter "SQL
243

Advertisement

Table of Contents
loading

Table of Contents