Transactions
BEGIN, COMMIT, ROLLBACK, and the isolation levels that decide what concurrent transactions see of each other.
Every INSERT, UPDATE, and DELETE on the previous pages ran as its own
implicit transaction. This section covers doing it on purpose — grouping
several statements so they succeed or fail together, and controlling what
one transaction can see of another one running at the same time.
BEGIN, COMMIT, ROLLBACK
Group statements into one all-or-nothing unit, and undo them before they're permanent.
Isolation levels
Read Uncommitted through Serializable — the anomalies each one prevents, and each engine's default.
Playground note
The playground is one single-connection SQLite session, so it can't demonstrate
two transactions running concurrently — that's what the isolation-levels page
covers with static comparisons instead. What it can show live, and does: a
BEGIN … COMMIT making changes permanent, and a BEGIN … ROLLBACK undoing
them, against a scratch copy of a seed table so nothing else on the site is
affected.