fetch  grant

Chapter 1: Commands

goto label

Description

Branches to a user-defined label.

Syntax

label: 
	goto label

Examples

Example 1

Shows the use of a label called restart:

declare @count smallint 
select @count = 1 
restart: 
  print "yes" 
select @count = @count + 1 
while @count <=4 
  goto restart

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

goto permission defaults to all users. No permission is required to use it.

See also

Commands if...else, while





Copyright © 2005. Sybase Inc. All rights reserved. grant

View this book as PDF