Which SQL statement allows you to roll back a transaction in the event of an error?

  • BEGIN TRANSACTION
  • COMMIT TRANSACTION
  • END TRANSACTION
  • ROLLBACK TRANSACTION
The SQL statement that allows you to roll back a transaction in the event of an error is ROLLBACK TRANSACTION. This statement is used to undo all changes made to the database since the start of the current transaction and to restore the database to its previous state. It is essential for maintaining data integrity and consistency, especially in critical transactional operations.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *