QuestionQ37

VerifiedUsing DML and Transaction Control Statements

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 work performed after that savepoint and does not end the transaction. Therefore, it reverses the delete and restores all 101 rows, including the still-uncommitted inserted row. A rollback without a savepoint reverses all remaining changes in the current transaction, so it undoes the insert. Oracle Database SQL Language Reference: ROLLBACK

Learn more

Community Discussion

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