Transactions group multiple SQL statements into one unit. Either everything runs successfully, or nothing happens. This helps protect data from errors or crashes mid-process.
BEGIN TRANSACTION — Starts a new transactionCOMMIT — Saves changes made by the transactionROLLBACK — Cancels all changes made during the transactionBEGIN TRANSACTION and COMMIT, use ROLLBACK to undo everything safely.