?
What is the command to disable autocommit and launch a transaction?
Answer & Solution
Correct Answer:
Option
B
This question is about starting a transaction in MySQL. Transactions are a way to group multiple SQL statements together so they are treated as one unit. If all the statements in a transaction are successful, the changes are committed to the database. But if any statement fails, all the changes are rolled back.
The command to disable autocommit and launch a transaction is START TRANSACTION.
Here's why the other options are incorrect:
INITIATE TRANSACTION is not a valid MySQL command.
DISABLE AUTOCOMMIT only disables autocommit, but it doesn't start a transaction.
TRANSACTION is not a command but a keyword used in other commands.
Therefore, the correct answer is Option B: START TRANSACTION
The command to disable autocommit and launch a transaction is START TRANSACTION.
Here's why the other options are incorrect:
INITIATE TRANSACTION is not a valid MySQL command.
DISABLE AUTOCOMMIT only disables autocommit, but it doesn't start a transaction.
TRANSACTION is not a command but a keyword used in other commands.
Therefore, the correct answer is Option B: START TRANSACTION
Join the Discussion
Login to post a comment or share your explanation.
Login