课程: Hands-On Introduction: SQL
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Commit and rollback
- [Instructor] Now we learn about Transaction Control Language or also called as TCL. There are three TCL statements; that is Commit, Rollback, and Savepoint. A transaction is a set of statements which begin when the DML statement is executed and ends when Commit or Rollback is issued, or when a DDL or a DCL statement is executed, auto commit will occur, or if the user exits the system or the system crashes. So these are the possible scenarios when a transaction ends. Now let's learn about the first TCL statement, that is Commit. Commit ends the current transaction and saves all the data changes, thus, making them permanent. For DML statements, we need to give Commit in order to save the changes, unlike DDL and DCL statements, which are auto committed. Auto commit also occurs when the user exits the system normally without explicitly executing a Commit statement. Now let's compare the data before and after Commit.…