Was this helpful?
END TRANSACTION Statement
The END TRANSACTION statement terminates an in-progress multi-statement transaction (MST) and commit its updates, if any, to the database. This statement causes all database updates effected by the MST to become available to other user transactions. After committing an MST with END TRANSACTION, the MST is terminated, the MST can no longer be aborted, and all its savepoints are nullified.
This statement has the following format:
END TRANSACTION
END TRANSACTION Example
The following example begins an MST, executes some SQL statements, and commits the updates to the database:
BEGIN TRANSACTION;
INSERT INTO emp (name, sal, bdate)
     VALUES ('Jones,Bill', 10000, 1914);
INSERT INTO emp (name, sal, bdate)
     VALUES ('Smith,Stan', 20000, 1948);
END TRANSACTION; \g/* commits new rows to table */
Last modified date: 08/29/2024