EasyManua.ls Logo

Sybase Adaptive Server Anywhere - GOTO Statement [T-SQL]

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
539
GOTO statement [T-SQL]
Use this statement to branch to a labeled statement.
label:
GOTO
label
None.
None.
Any statement in a Transact-SQL procedure, trigger, or batch can be labeled.
The label name is a valid identifier followed by a colon. In the GOTO
statement, the colon is not used.
SQL/92 Persistent Stored Module feature.
Sybase Adaptive Server Enterprise supports the GOTO statement.
The following Transact-SQL batch prints the message "yes" on the
server window four times:
declare @count smallint
select @count = 1
restart:
print ’yes’
select @count = @count + 1
while @count <=4
goto restart
Function
Syntax
Authorization
Side effects
Description
Standards and
compatibility
Example

Table of Contents

Related product manuals