Difference between revisions of "Transaction Control Statement"

From rbachwiki
Jump to navigation Jump to search
Line 4: Line 4:
* An implicit COMMIT occurs when you exit client tools, such as SQL Developer. It also occurs if a DDL command, such as CREATE or ALTER TABLE, is issued. In other words, if a user adds several records to a table and then creates a new table, the records added before the DDL command is issued are committed automatically (implicitly).
* An implicit COMMIT occurs when you exit client tools, such as SQL Developer. It also occurs if a DDL command, such as CREATE or ALTER TABLE, is issued. In other words, if a user adds several records to a table and then creates a new table, the records added before the DDL command is issued are committed automatically (implicitly).
* By contrast, commands such as CREATE TABLE, TRUNCATE TABLE, and ALTER TABLE can’t be rolled back because they are DDL commands, and a commit occurs automatically when they’re executed
* By contrast, commands such as CREATE TABLE, TRUNCATE TABLE, and ALTER TABLE can’t be rolled back because they are DDL commands, and a commit occurs automatically when they’re executed
==SavePoint Command ===
'''developers sometimes use the SAVEPOINT command to create a type of bookmark in a transaction. This command is commonly used in the banking
industry'''

Revision as of 21:19, 18 October 2017

Commit Command

A COMMIT command issued implicitly or explicitly permanently saves the DML statements issued previously

  • An explicit COMMIT occurs when you enter a COMMIT statement
  • An implicit COMMIT occurs when you exit client tools, such as SQL Developer. It also occurs if a DDL command, such as CREATE or ALTER TABLE, is issued. In other words, if a user adds several records to a table and then creates a new table, the records added before the DDL command is issued are committed automatically (implicitly).
  • By contrast, commands such as CREATE TABLE, TRUNCATE TABLE, and ALTER TABLE can’t be rolled back because they are DDL commands, and a commit occurs automatically when they’re executed

SavePoint Command =

developers sometimes use the SAVEPOINT command to create a type of bookmark in a transaction. This command is commonly used in the banking industry