7.6.8. EXIT
Used for
Terminating module execution
Available in
PSQL
Syntax
EXIT
The EXIT
statement causes execution of the procedure or trigger to jump to the final END
statement from any point in the code, thus terminating the program.
Example
Using the EXIT
statement in a selectable procedure:
CREATE 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
See also