Pervasive logo

Prev SQL Engine Reference Next

LEAVE


Remarks

A LEAVE statement continues execution by leaving a block or loop statement. You can use LEAVE statements in the body of a stored procedure or a trigger.

Examples

The following example increments the variable vInteger by 1 until it reaches a value of 11, when the loop is ended with a LEAVE statement.

TestLoop: 
LOOP 
IF (:vInteger > 10) THEN 
LEAVE TestLoop; 
END IF; SET :vInteger = :vInteger + 1;
END LOOP;

See Also

IF

LOOP


Prev
JOIN
Contents
Up
Check for Revisions
Next
LIKE