QuestionQ49

VerifiedManipulating Data

Review the description of the BOOKS table:

Question Image

The table contains 100 rows. Review this sequence of statements issued in a new session:

INSERT INTO books VALUES ('ADV112', 'Adventures of Tom Sawyer', NULL, NULL);  
SAVEPOINT a;  
DELETE FROM books;  
ROLLBACK TO SAVEPOINT a;  
ROLLBACK;  

Which two statements are true?

Choose two
Explanation

A rollback to a savepoint reverses only the changes made after that savepoint. Therefore, it restores all 101 rows deleted by DELETE FROM books and leaves the row inserted before the savepoint uncommitted. A subsequent full ROLLBACK reverses all remaining uncommitted changes in the transaction, including that insert.

Community Discussion

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