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.
Loading...
Related Quiz
- Which type of data migration testing ensures that data is consistent and accurate after migration?
- What is the primary purpose of using monitoring and profiling tools in database testing?
- In SQL, the "TRY...CATCH" block is used to handle ____________ that may occur during query execution.
- What happens when you create too many indexes on a database table?
- What is the purpose of spike testing in performance testing?