Exam 1z0-071 All QuestionsBrowse all questions from this exam
Question 36

Examine the description of the BOOKS table:

The table has 100 rows.

Examine 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.)

    Correct Answer: C, D

    The sequence of operations first inserts one row into the BOOKS table, leading to a total of 101 rows. The first SAVEPOINT 'a' allows for a partial rollback to this point. The DELETE FROM books statement then removes all the rows in the table, reducing the count to 0. The first ROLLBACK TO SAVEPOINT 'a' undoes the DELETE operation, restoring the table to its state immediately following the INSERT command (101 rows, including the newly inserted row). The final ROLLBACK without specifying a savepoint undoes all changes made in the current transaction, which includes the insert operation, reverting the table to its initial state of 100 rows. Therefore, the first ROLLBACK command restores the 101 rows that were deleted, leaving the inserted row still to be committed, while the second ROLLBACK command undoes the insert.

Discussion
Orxan_HOptions: CD

Rollback without savepoint: - end of the transaction - delete savepoints - undoes all changes in the transactions

alelejajaOptions: CD

CD are correct

yaya32Options: DE

For me DE

TheOracleWasTakenOptions: CD

Seems right!