?
Which command undo all the updates performed by the SQL in the transaction?
Answer & Solution
Correct Answer:
Option
A
In SQL, the command that undoes all the updates performed by the SQL statements within a transaction is the ROLLBACK command. When you issue the ROLLBACK command, it cancels all the changes made during the transaction, effectively reverting the database to its previous state.
COMMIT (Option B) is used to make the changes performed by the transaction permanent in the database.
TRUNCATE (Option C) is used to quickly delete all rows from a table, but it doesn't address the concept of transactions or undoing updates.
DELETE (Option D) is used to remove specific rows from a table, but it doesn't undo all changes made within a transaction.
So, Option A, the ROLLBACK command, is the correct choice for undoing all updates performed by SQL statements in a transaction.
COMMIT (Option B) is used to make the changes performed by the transaction permanent in the database.
TRUNCATE (Option C) is used to quickly delete all rows from a table, but it doesn't address the concept of transactions or undoing updates.
DELETE (Option D) is used to remove specific rows from a table, but it doesn't undo all changes made within a transaction.
So, Option A, the ROLLBACK command, is the correct choice for undoing all updates performed by SQL statements in a transaction.
Join the Discussion
Login to post a comment or share your explanation.
Login