What does the ROLLBACK statement do? MCQ with Answer and Explanation

What does the ROLLBACK statement do?
A. Undoes all changes made in the current transaction
B. Saves the changes
C. Starts a new transaction
D. Creates a savepoint
Answer: Option A
Solution (By JKSSB Mock Tests)
ROLLBACK reverts the database to the state it was in at the beginning of the transaction, undoing all changes.

Discuss this Question (0)

No comments yet. Be the first to start the discussion!

Practice More Database Management System (DBMS) Questions

Question #1
Which operator is specifically used to verify whether a column value contains a NULL entry?
A. = NULL
B. LIKE NULL
C. IS NULL
D. IN NULL

Correct Answer: Option C


Explanation:
Because NULL represents an unknown value, it cannot be compared using the equality operator (=). Instead, the special 'IS NULL' operator must be used.

This question belongs to: Computer Database Management System (DBMS)
Question #2
What is the purpose of the SAVEPOINT statement?
A. To start a new transaction
B. To create a point within a transaction to which you can later roll back
C. To permanently save changes
D. To release locks

Correct Answer: Option B


Explanation:
SAVEPOINT creates a named point within a transaction, allowing partial rollback to that point without affecting the entire transaction.

This question belongs to: Computer Database Management System (DBMS)
Question #3
In SQL, what does the 'IS NULL' operator check?
A. Whether a value is missing (null)
B. Whether a value is zero
C. Whether a value equals NULL
D. Whether a value is empty string

Correct Answer: Option A


Explanation:
IS NULL is used to test for NULL values, because NULL is not equal to anything.

This question belongs to: Computer Database Management System (DBMS)