EXIT
Terminates execution of a module
EXIT;
The EXIT statement causes execution of the current PSQL module to jump to the final END statement from any point in the code, thus terminating the program.
Calling EXIT in a function will result in the function returning NULL.
EXIT Examples
EXIT statement in a selectable procedureCREATE PROCEDURE GEN_100
RETURNS (I INTEGER)
AS
BEGIN
I = 1;
WHILE (1=1) DO
BEGIN
SUSPEND;
IF (I=100) THEN
EXIT;
I = I + 1;
END
END