Bird
0
0

What does the COMMIT command do in a database transaction?

easy📝 Conceptual Q11 of 15
SQL - Transactions and Data Integrity
What does the COMMIT command do in a database transaction?
AIt locks the database to prevent changes.
BIt undoes all changes made during the transaction.
CIt starts a new transaction.
DIt saves all changes made during the transaction permanently.
Step-by-Step Solution
Solution:
  1. Step 1: Understand the purpose of COMMIT

    The COMMIT command finalizes all changes made in the current transaction and saves them permanently in the database.
  2. Step 2: Compare with other options

    ROLLBACK undoes changes, starting a transaction is done by BEGIN or START TRANSACTION, and locking is a different operation.
  3. Final Answer:

    It saves all changes made during the transaction permanently. -> Option D
  4. Quick Check:

    COMMIT = Save changes permanently [OK]
Quick Trick: COMMIT means save changes permanently [OK]
Common Mistakes:
  • Confusing COMMIT with ROLLBACK
  • Thinking COMMIT starts a transaction
  • Assuming COMMIT locks the database

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes