Suggest an editImprove this articleRefine the answer for “What happens if a transaction fails midway?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)If a transaction fails midway, **all of its changes get undone**: the database rolls back to the state it was in **before the transaction started** - this is atomicity in action, either everything runs or nothing does. **Key point:** for example, if the connection drops during a money transfer, the system won't debit part of the amount - the transfer simply **won't happen**.Shown above the full answer for quick recall.Answer (EN)ImageIf a transaction fails midway, **all of its changes get undone**. The database rolls back to the state it was in **before the transaction started**. This is atomicity in action, either everything runs, or nothing does. For example: if you're transferring money and the connection drops mid-operation, the system won't debit part of the amount - the transfer simply **won't happen**.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.