A Rollback statement cannot be used to close transaction.
-
True
-
False
The statement is False because ROLLBACK can be used to close a transaction. When you issue a ROLLBACK statement, it undoes all changes made in the current transaction and effectively ends/closes that transaction. After a ROLLBACK, a new transaction begins with the next SQL statement. COMMIT also closes a transaction. Both ROLLBACK and COMMIT are transaction control statements that terminate the current transaction.
To answer this question, let's first understand what a rollback statement is and its purpose in a transaction.
A rollback statement is used to undo or cancel the changes made in a transaction and restore the database to its previous state. It is typically used when an error or an exceptional condition occurs during the execution of a transaction.
Now, coming to the given statement: "A Rollback statement cannot be used to close a transaction."
This statement is incorrect. A rollback statement is indeed used to close a transaction by undoing the changes made within the transaction. After executing a rollback statement, the transaction is effectively closed, and any changes made within the transaction are reverted.
Therefore, the correct answer is B) False.