×
☰ See All Chapters

Oracle SAVEPOINT

A savepoint is a stage in a transaction where you can roll the transaction back to this stage without rolling back the entire transaction. The savepoint is a way of dividing the large transaction unit into numbers of smaller manageable transaction.  

The syntax for the SAVEPOINT command is

savepoint savepoint_name

This command serves only to create a savepoint among transactional statements.

The syntax for rolling back to a savepoint is as follows:

ROLLBACK TO SAVEPOINT_NAME;

To delete the savepoint RELEASE SAVEPOINT command is used.  You might want to issue a RELEASE SAVEPOINT command to avoid the accidental rollback to a savepoint that is no longer needed.

RELEASE SAVEPOINT savepoint_name;

 

 


All Chapters
Author