Oracle COMMIT

A SQL statement that runs successfully is different from a committed transaction. Executing successfully means that a single statement was:

  • Parsed 

  • Found to be a valid SQL construction 

  • Run without error as an atomic unit. For example, all rows of a multi-row update are changed. 

However, until the transaction that contains the statement is committed, the transaction can be rolled back, and all of the changes of the statement can be undone. A statement, rather than a transaction, runs successfully.

The COMMIT command is the transactional command used to save changes made by any number of transactions since the last COMMIT or ROLLBACK command. If AUTOCOMMIT set to false and the transaction not committed, the changes will be visible only for the current connection. After COMMIT statement commits the changes to the table, the result will be visible for all connections.

The syntax for this command is

commit [ work ];

WORK is a keyword that is completely optional; its only purpose is to make the command more user-friendly.

 

 

← Previous - TransactionNext - Rollback →
By Manu Manjunatha
Author

Dear Reader, I created this site to help students and professionals learn software technologies. I am committed to provide easy and detailed tutorials. I hope you see all that reflected in the tutorials. I am happy to hear your comments and get your feedback on how I am doing. Some errors may have accidentally crept in the tutorials despite my hard work. Please send me your valuable feedback from here Contact Us .
Follow the fun here: