CommitCommandTransactionsSave the modification to the database.CommitOrRollbackAll transactions after the command are saved to the database.
The syntax of this command is: Commit
[Work];
Keywords Commit Is the only indispensable part of the syntax, followed by the characters or commands used to terminate the statement. The specific content depends on different implementations. Keywords Work Is an option, its only role is to make the command more user-friendly.
In the following example Product_tmp Start of all data in:
Select * From products_tmp;
Prod_id
Prod_desc
Cost
12345 witches
Costume 1, 29.99
222 false paraffin
Teeth 1.1
13
Plastic (pumpkin 7.75)
90 lighted
Lanterns
14.5
4 rows selected.
Next, delete all 14.00 .
Delete from products_tmp
Where cost <14;
2 rows deleted.
Use one Commit Statement to save the modification to the database. Transactions .
Commit;
Commit complete.
Warning the database should be used more for large-scale data loading or revocation. Commit Statement; however, too many Commit The statement will take a lot of extra time to complete the work.
Remember, all modifications are first sent to the temporary rollback area. If the temporary rollback area has no space and you cannot save the changes made to the database, the database may be suspended and further modification is prohibited.TransactionsOperation.
Note: In some implementations, transactions do not useCommitCommand submission is triggered by the database exit operation.
However, in some implementations, suchMySQL, In the executionSettransactionAfter the command, the database receivesCommitOrRollbackPreviously, the automatic submission function will not be restored.