Transaction Commit
Question
What does COMMIT do?
Hint
COMMIT ends a transaction successfully.
Explanation
COMMIT permanently saves all changes (INSERT, UPDATE, DELETE) made within the current transaction to the database. Once committed, changes cannot be rolled back. COMMIT ends the transaction and releases locks. All changes within the transaction become visible to other sessions. If an error occurs before COMMIT, ROLLBACK undoes all changes. Auto-commit mode (default in many databases) commits each statement individually. Use explicit transactions (BEGIN/COMMIT/ROLLBACK) for multi-statement operations that must be atomic.
Related Resources
Related Lessons
- Transactions
Learn transactions.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.