Control units of work with atomicity.
A sequence of statements treated as a single atomic unit that either all succeed or all fail. Use BEGIN/COMMIT/ROLLBACK to control boundaries. Essential for data integrity in multi-step operations. Keep transactions short to reduce lock contention.
| Database System | Support Status | Since Version | Notes |
|---|---|---|---|
| MySQL | ✓ Supported | all | AUTOCOMMIT=ON by default |
| PostgreSQL | ✓ Supported | all | Standard |
| SQL Server | ✓ Supported | all | BEGIN TRAN / COMMIT |
| Oracle | ✓ Supported | all | AUTOCOMMIT=OFF by default |
| SQLite | ✓ Supported | all | AUTOCOMMIT=ON by default |
Ensure atomic, consistent, isolated, durable operations.
AUTOCOMMIT=ON by default
Standard
BEGIN TRAN / COMMIT
AUTOCOMMIT=OFF by default
AUTOCOMMIT=ON by default