EasyManua.ls Logo

Sybase Adaptive Server Anywhere - Page 423

Sybase Adaptive Server Anywhere
1182 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 9 SQL Statements
405
local-declaration Immediately following the BEGIN, a compound
statement can have local declarations for objects that only exist within the
compound statement. A compound statement can have a local declaration for
a variable, a cursor, a temporary table, or an exception. Local declarations
can be referenced by any statement in that compound statement, or in any
compound statement nested within it. Local declarations are not visible to
other procedures that are called from within a compound statement.
statement-label If the ending statement-label is specified, it must match
the beginning statement-label. The LEAVE statement can be used to resume
execution at the first statement after the compound statement. The compound
statement that is the body of a procedure or trigger has an implicit label that
is the same as the name of the procedure or trigger.
$ For a complete description of compound statements and exception
handling, see "Using Procedures, Triggers, and Batches" on page 435 of the
book ASA Users Guide.
SQL/92 Persistent Stored Module feature.
Sybase Supported by Adaptive Server Enterprise. This does not mean
that all statements inside a compound statement are supported.
The BEGIN and END keywords are not required in Transact-SQL.
BEGIN and END are used in Transact-SQL to group a set of statements
into a single compound statement, so that control statements such as IF
… ELSE, which only affect the execution of a single SQL statement,
can affect the execution of the whole group. The ATOMIC keyword is
not supported by Adaptive Server Enterprise.
In Transact-SQL. DECLARE statements need not immediately follow a
BEGIN keyword, and the cursor or variable that is declared exists for
the duration of the compound statement. You should declare variables at
the beginning of the compound statement for compatibility.
The body of a procedure or trigger is a compound statement.
Parameters
Standards and
compatibility
Example

Table of Contents

Related product manuals