Tell Me
 

Committing and Rolling Back Changes

Previous previous|next Next Page
 

If data manipulation statement complete and if no error occurred, database modifications through embedded insert, update, and delete statements must be committed. This is done by using the following SQL statement

COMMIT;

If an error occurred and previous non-committed data modifications need to be undone, the embedded SQL statement

ROLLBACK;

By default any Oracle database is configured with option Auto-commit off. You have to execute COMMIT comand after every data manipulation statement;

Update employee Shawn Adams and change the HIREDATE value to April 1, 2001.
Then commit the changes.
Retrive the record to observe the change.
Update same employee and change the HIREDATE value to April 2, 2001.
Rollback and retriev the record