Last Updated: June 6, 2026
A transaction is a group of database operations that succeed or fail as a single unit. This lesson is about what happens when one of those statements works and the next one fails. Without transactions, a database can end up with half-finished orders, products with stock deducted but no order to show for it, and customers charged for items that never shipped.