From the course: Oracle Database 12c: Basic SQL

Unlock the full course today

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

COMMIT and ROLLBACK

COMMIT and ROLLBACK - Oracle Database Tutorial

From the course: Oracle Database 12c: Basic SQL

Start my 1-month free trial

COMMIT and ROLLBACK

- Commit and rollback in Oracle are commands that control the final stake of transactions done in the database. A transaction is an autonomous unit of work where you have modified data. So for example inserting rows to a table is considered a transaction because you have modified rows, however, at the end of your transaction, that is, after the last command that you executed as part of your transaction, say an insert command, you can choose to either commit the changes, make them persistent or rollback the changes which is essentially undoing the changes in your database. So for example, if I select all of the rows from my test table, I see that I have four rows inserted. We inserted these rows in our previous video. However note what happened if I choose to rollback my transaction. I got the rollback complete command from the database and selecting data from test table will show me an empty table. That's because I have rolled-back changes from my currently active transaction. I can…

Contents