You can undo all changes after a savepoint by issuing a ROLLBACK TO SAVEPOINT.
This command rolls back to the savepoint you specify, or to the most recent SAVEPOINT if you do not specify a named savepoint. Rolling back to savepoint n undoes all actions for all savepoints greater than or equal to n.
Normally, locks are released only at the end of a transaction. However, ROLLBACK TO SAVEPOINT does release locks under certain conditions, as in the following scenario:
Assume that you have a series of savepoints in a transaction, and then perform a write operation. You then roll back the transaction to an earlier savepoint. The rollback undoes all actions after that savepoint, including the write operation and any locks it acquires after the savepoint you are rolling back to.
Sybase IQ supports savepoint operations on updatable cursors.