A transaction is a logical unit of work that divides the activities of a database, and a transaction has a starting point and an end point.
The transaction begins when one of the following events occurs:
Connects to the database and executes the first-day DML statement, and a second DML statement is entered after the current transaction ends;
The transaction ends when one of the following events occurs:
Executes a commit or ROLLBACK statement, executes a DLL statement, such as a CREATE TABLE statement, in which case a commit statement is executed automatically, and a DCL statement, such as a grant statement, is executed, in which case the commit statement is executed automatically; The connection to the database. When you exit Sql*plus, the Exit command is typically entered, and the commit statement is executed automatically. If the Sql*plus is terminated unexpectedly (for example, a computer running Sql*plus crashes), the rollback statement is executed automatically, a DML statement is executed, and the statement fails, and in this case the rollback is executed for the invalid DML statement;
Note: After a transaction completes, it is considered bad programming practice to commit or rollback a transaction without displaying it, so make sure that a commit or ROLLBACK statement is executed after each transaction.
This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/