Pervasive logo

Prev SQL Engine Reference Next

LOOP


Remarks

A LOOP statement repeats the execution of a block of statements.

This statement is only allowed in stored procedures and triggers.

Pervasive.SQL does not support post-conditional loops (REPEAT...UNTIL).

Examples

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

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

See Also

CREATE PROCEDURE

CREATE TRIGGER

IF


Prev
LIKE
Contents
Up
Check for Revisions
Next
NOT