Begin a transaction explicitly.
Section: transactions
Start a transaction
sql
sql
START TRANSACTION;Explanation
Explicit transactions let you group related writes into a single atomic unit.
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
Disable autocommit for the session
Keep statements in a transaction until you commit or rollback.
Set transaction isolation level
Control read consistency and concurrency behavior.
Lock selected rows for update
Prevent concurrent modifications to matched rows inside a transaction.