Bird
0
0

Which of the following is the correct syntax to undo changes made in the current transaction?

easy📝 Syntax Q12 of 15
SQL - Transactions and Data Integrity
Which of the following is the correct syntax to undo changes made in the current transaction?
ACOMMIT;
BROLLBACK;
CUNDO;
DSAVE;
Step-by-Step Solution
Solution:
  1. Step 1: Identify the command to undo changes

    The ROLLBACK command is used to undo all changes made since the last COMMIT.
  2. Step 2: Check syntax correctness

    ROLLBACK; is the correct syntax. COMMIT; saves changes, UNDO; and SAVE; are not valid SQL commands for this purpose.
  3. Final Answer:

    ROLLBACK; -> Option B
  4. Quick Check:

    ROLLBACK = Undo changes [OK]
Quick Trick: ROLLBACK undoes changes, COMMIT saves them [OK]
Common Mistakes:
  • Using COMMIT to undo changes
  • Assuming UNDO is a valid SQL command
  • Confusing SAVE with COMMIT

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes