RELEASE SAVEPOINT statement
If you don’t need any longer a specific savepoint it’s possible to release the savepoint with the RELEASE SAVEPOINT statement.
RELEASE [TO] SAVEPOINT <savepointname>
create procedure savepoints begin insert into test values ('1st Insert'); savepoint mysavepoint on rollback retain cursors; insert into test values ('2nd Insert'); release savepoint mysavepoint; rollback to savepoint mysavepoint; end!
Test of this example:
You will get an runtime error (SQL0880N) because the savepoint mysavepoint is not available in during the rollback statement is executed.