From the course: Oracle Database 19c: Advanced SQL

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Using ROLLBACK

Using ROLLBACK - Oracle Database Tutorial

From the course: Oracle Database 19c: Advanced SQL

Start my 1-month free trial

Using ROLLBACK

- [Instructor] The Oracle Database ROLLBACK Statement is the way you'll reverse pending changes to the database instead of making them permanent with commit. The transactional statements such as ROLLBACK help enforce the acid rules around a database transaction atomicity, consistency, isolation and durability. There are some cautions when using ROLLBACK though, this lesson covers ROLLBACK. Here's the Syntax of ROLLBACK. The work keyword is for readability and is optional. If your roll back to a safe point, the save point keyword is optional too. The ROLLBACK command reverts all pending DML statements since the last COMMIT safe point, those DML actions are no longer available and won't be made permanent when the next commit happens. Here's what happens during a ROLLBACK. After I create a table called department's history, I insert one row, then run a commit, then count the rows. After the commit, the added row to the table is made permanent, then I run a second insert to account then…

Contents