From the course: SQL Queries Made Easy
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Rollback in database changes - SQL Tutorial
From the course: SQL Queries Made Easy
Rollback in database changes
- [Narrator] In this video, we learned about two other transaction control statements, namely rollback and savepoint. They both work together. Rollback discard all pending data changes and ends the current transaction. Savepoint creates a marker point within a transaction. By using commit and rollback we can preview the data changes before making them permanent. AutoRollback occurs when there is a system failure or abnormal termination of the system. Now, let's understand by taking an example. Here, I have issued a commit to save all the pending changes that have been executed before this commit statement. Now, I start a new transaction. A new transaction begins when I execute the first DML statement. So, once I execute this insert statement, a new transaction has started. Now, after the insert statement, I've given an update statement, then I have written earth savepoint to create a marker point in this transaction.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.