Keep statements in a transaction until you commit or rollback.
Section: transactions
Disable autocommit for the session
sql
sql
SET autocommit = 0;Explanation
Use carefully; long-lived transactions can hold locks and increase contention.
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