What is difference between commit and rollback?
COMMIT | ROLLBACK |
---|---|
Syntax: COMMIT; | Syntax: ROLLBACK; |
Used to validate modifications made by current transactions | Used to erase modifications made by current transactions |
After executing this, a transaction can’t be used for ROLLBACK | After executing this, a transaction can be modified and sent for COMMIT |
Occurs after successful completion of a transaction | Occurs if transaction is abrupted unexpectedly |
BY Best Interview Question ON 30 Jan 2020