Bird
0
0

What happens immediately after executing BEGIN TRANSACTION in an SQL session?

easy📝 Conceptual Q1 of 15
SQL - Transactions and Data Integrity
What happens immediately after executing BEGIN TRANSACTION in an SQL session?
AThe database automatically commits all previous changes
BA new transaction starts, grouping subsequent SQL statements until COMMIT or ROLLBACK
CAll tables are locked permanently
DThe database connection is closed
Step-by-Step Solution
Solution:
  1. Step 1: Understand BEGIN TRANSACTION

    It marks the start of a transaction block where multiple SQL statements are executed as a single unit.
  2. Step 2: Effect on SQL session

    After BEGIN TRANSACTION, changes are not permanent until COMMIT; they can be undone with ROLLBACK.
  3. Final Answer:

    A -> Option B
  4. Quick Check:

    Transaction groups statements until commit or rollback [OK]
Quick Trick: BEGIN TRANSACTION starts a transaction block [OK]
Common Mistakes:
  • Assuming BEGIN TRANSACTION commits changes immediately
  • Thinking it locks all tables permanently
  • Believing it closes the connection

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes