Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

LEAVE - Terminate a loop or COMPOUND statement

The LEAVE statement terminates a loop or COMPOUND statement.
It may may only be specified in the control statements COMPOUND, FOR, LOOP, REPEAT, and WHILE of a routine, i.e. in the context of a CREATE PROCEDURE or CREATE FUNCTION statement. Routines and their use in SESAM/SQL are described in detail in chapter "Routines".



LEAVE label



label

Label of the COMPOUND, FOR, LOOP, REPEAT, or WHILE statement which contains the LEAVE statement. The statement identified is terminated.

Example

See the LOOP statement example on "LOOP - Execute SQL statements in a loop".

See also

CREATE PROCEDURE, CREATE FUNCTION, FOR, LOOP, REPEAT, WHILE