In SQL, how do you handle transactions to ensure data integrity?

  • All of the above
  • Use the COMMIT statement to finalize changes
  • Use the ROLLBACK statement to undo changes
  • Use the SAVEPOINT statement to create checkpoints
Using the SAVEPOINT statement allows creating checkpoints in a transaction, and in case of errors or issues, you can roll back to these checkpoints to ensure data integrity. COMMIT finalizes changes, and ROLLBACK undoes changes. Choosing "All of the above" is incorrect, as COMMIT and ROLLBACK are not SAVEPOINT-related operations.
Add your answer
Loading...

Leave a comment

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