Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Control statements

Routine (Stored Procedure and UDF)

SQL statement1

Function

COMPOUND

Statements in the context

CALL

Call a procedure

CASE

Execute statements conditionally

FOR

Execute statements in a loop

IF

Execute statements conditionally

ITERATE

Switch to the next loop pass

LEAVE

Terminate loop or COMPOUND statement

LOOP

Execute statements in a loop

REPEAT

Execute statements in a loop

RETURN

Supply the return value of a User Defined Function (UDF)

SET

Assigns a value

WHILE

Execute statements in a loop

Table 47: SQL statements for procedures

1Only in a CREATE PROCEDURE or CREATE FUNCTION statement