What affect will this command have on the database?

Oliver works as a Database Administrator for ADO Inc. He manages the database of the company.

The database has a table named Product. He wants to perform some delete operations on the
table. He issues the following SQL query:
SAVEPOINT NP1
DELETE FROM Product WHERE ProductID=’112′
SAVEPOINT NP2
DELETE FROM Product WHERE ProductID=’90’
SAVEPOINT NP3
DELETE FROM Product WHERE ProductID=’113′
After three deletions, he changes his mind and issues the following command:
ROLLBACK to NP2
What affect will this command have on the database?

Oliver works as a Database Administrator for ADO Inc. He manages the database of the company.

The database has a table named Product. He wants to perform some delete operations on the
table. He issues the following SQL query:
SAVEPOINT NP1
DELETE FROM Product WHERE ProductID=’112′
SAVEPOINT NP2
DELETE FROM Product WHERE ProductID=’90’
SAVEPOINT NP3
DELETE FROM Product WHERE ProductID=’113′
After three deletions, he changes his mind and issues the following command:
ROLLBACK to NP2
What affect will this command have on the database?

A.
It will delete the records having ProductID as 112 and 113.

B.
It will delete the record where ProductID is 112.

C.
All the changes will be reverted, i.e. no records will be deleted from the table.

D.
It will delete the record where ProductID is 90.



Leave a Reply 0

Your email address will not be published. Required fields are marked *