SAVEPOINT
SAVEPOINT savepoint
					

Identifies a point in a transaction to which you can roll back using the ROLLBACK command.

savepoint

Specifies a name for the savepoint being created.

Example

Set a savepoint, update the sal column of the emp table, and then issue a ROLLBACK command to return the state of the table to the condition at the time the savepoint was established:

UPDATE emp
   SET comm = comm * 1.1;

SAVEPOINT updtsal;

UPDATE emp
   SET sal = sal * 1.1;

ROLLBACK TO updtsal;

Get Oracle SQL: the Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.