TCL statements manage groups of changes as a single unit, called a transaction — so a set of related changes either all happen, or none do. This is the last of the four SQL command families.
Saves all changes made in the current transaction permanently.
COMMIT;Common Mistake
Forgetting to COMMIT and losing changes when the session ends.
Cancels all uncommitted changes in the current transaction.
ROLLBACK;Common Mistake
Assuming ROLLBACK can undo changes that were already committed — it can't.
Marks a point inside a transaction that you can roll back to, without undoing everything.
SAVEPOINT savepoint_name;SAVEPOINT BeforeUpdate;Common Mistake
Relying on SAVEPOINT across separate sessions — it only lives within one transaction.
With all four SQL families covered — DDL, DML, DCL, and TCL — the next set of lessons moves into querying: filtering, sorting, and grouping the data you now know how to define, change, control, and commit.