Bird
0
0

Which of the following is the correct way to initiate a transaction in SQL Server?

easy📝 Syntax Q3 of 15
SQL - Transactions and Data Integrity
Which of the following is the correct way to initiate a transaction in SQL Server?
ASTART TRANSACTION;
BBEGIN TRANSACTION;
CBEGIN;
DOPEN TRANSACTION;
Step-by-Step Solution
Solution:
  1. Step 1: Identify SQL Server syntax

    SQL Server uses BEGIN TRANSACTION; to start a transaction.
  2. Step 2: Compare options

    START TRANSACTION; is used in MySQL, BEGIN; is incomplete, and OPEN TRANSACTION; is invalid.
  3. Final Answer:

    A -> Option B
  4. Quick Check:

    SQL Server uses BEGIN TRANSACTION [OK]
Quick Trick: Use BEGIN TRANSACTION to start in SQL Server [OK]
Common Mistakes:
  • Confusing MySQL's START TRANSACTION with SQL Server syntax
  • Using incomplete or invalid commands like BEGIN or OPEN TRANSACTION

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes