Bundle multiple statements atomically.
Section: Transactions and savepoints
Start a transaction
sql
sql
BEGIN;
INSERT INTO audit_log(action) VALUES ('start');
UPDATE counters SET value = value + 1 WHERE key = 'jobs';
COMMIT;Explanation
Wrapping related writes in one transaction improves consistency and often performance.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Transactions and savepoints