ALLBASE/SQL Reference Manual (36216-90216)

498 Chapter12
SQL Statements S - Z
SAVEPOINT
Description
Specify the savepoint number in the TO clause of a ROLLBACK WORK statement to roll
back to a savepoint.
If a procedure invoked by a rule executes a COMMIT WORK statement, an error occurs.
Authorization
You do not need authorization to use the SAVEPOINT statement.
Example
Transaction begins.
BEGIN WORK
statement-1
SAVEPOINT :MyVariable
statement-2
statement-3
Work of statements 2 and 3 is undone.
ROLLBACK WORK
TO :MyVariable
Work of statement-1 is committed; transaction ends.
COMMIT WORK