The ROLLBACK statement is used to undo changes in a transaction.
It restores the database to its previous state.
ROLLBACK is used when an error occurs.
Changes made after START TRANSACTION remain temporary until committed.
ROLLBACK cancels all uncommitted changes.
ROLLBACK is important for handling failures.
It prevents incorrect or partial data from being saved.
This ensures data integrity.
If a transaction fails during execution, ROLLBACK returns the database to its safe state.
No changes are stored permanently.
ROLLBACK is essential in banking and payment systems.
It ensures safe error recovery.
Understanding ROLLBACK is mandatory for backend developers.