Skip to topics
tee / insights
LEARNING / SQL

TCL / Transaction Control Language

SQL TCL: Transaction control

Treat changes as one unit and decide whether to commit or roll them back. Follow BEGIN, changes made with DML, and COMMIT or ROLLBACK.

Topics in this category

Begin a transaction

BEGIN TRANSACTION starts the unit of changes. Check the product’s autocommit and session rules.

Commit changes

COMMIT confirms transaction changes. A later ROLLBACK does not undo an already committed transaction.

Roll back pending changes

ROLLBACK discards pending changes in the transaction. The syntax map pairs this with SELECT checks before and after an update.