Recall & Review
beginner
What does the COMMIT command do in SQL?
COMMIT saves all changes made in the current transaction permanently to the database.
Click to reveal answer
beginner
What happens when you use ROLLBACK in SQL?
ROLLBACK undoes all changes made in the current transaction, restoring the database to its previous state.
Click to reveal answer
beginner
When should you use COMMIT in a transaction?
Use COMMIT after you have completed all your changes and want to save them permanently.
Click to reveal answer
intermediate
Can you undo a COMMIT with ROLLBACK?
No, once you COMMIT, changes are permanent and cannot be undone by ROLLBACK.
Click to reveal answer
beginner
What is a transaction in SQL?
A transaction is a group of one or more SQL statements executed as a single unit, which can be committed or rolled back together.
Click to reveal answer
What does the ROLLBACK command do?
✗ Incorrect
ROLLBACK undoes all changes made in the current transaction.
When are changes saved permanently in a database?
✗ Incorrect
COMMIT saves changes permanently.
Can you undo a COMMIT with ROLLBACK?
✗ Incorrect
Once committed, changes cannot be undone by ROLLBACK.
What is a transaction?
✗ Incorrect
A transaction groups SQL statements to be committed or rolled back together.
Which command permanently saves changes made in a transaction?
✗ Incorrect
COMMIT saves all changes permanently.
Explain the difference between COMMIT and ROLLBACK in SQL.
Think about saving vs undoing changes.
You got /4 concepts.
Describe what a transaction is and how COMMIT and ROLLBACK affect it.
Consider a transaction like a batch of changes.
You got /4 concepts.