Export (0) Print
Expand All
ABS
ALL
AND
ANY
AVG
bit
COS
COT
DAY
EXP
GO
IN
LEN
LOG
MAX
MIN
NOT
OR
PI
SET
SIN
STR
SUM
TAN
USE
VAR
Expand Minimize

Control-of-Flow Language

SQL Server 2000

The table shows the Transact-SQL control-of-flow keywords.

Keyword Description
BEGIN...END Defines a statement block.
BREAK Exits the innermost WHILE loop.
CONTINUE Restarts a WHILE loop.
GOTO label Continues processing at the statement following the label as defined by label.
IF...ELSE Defines conditional, and optionally, alternate execution when a condition is FALSE.
RETURN Exits unconditionally.
WAITFOR Sets a delay for statement execution.
WHILE Repeats statements while a specific condition is TRUE.

Other Transact-SQL statements that can be used with control-of-flow language statements are:

CASE

/*...*/ (Comment)

-- (Comment)

DECLARE @local_variable

EXECUTE

PRINT

RAISERROR

Show:
© 2014 Microsoft