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

You execute these commands:

Which two, used independently, can replace so the query returns 1?

    Correct Answer: A, C

    To ensure that the SELECT COUNT(*) FROM customers query returns 1, the transaction must be rolled back to a state before the second insert. Using ROLLBACK; undoes all operations since the last COMMIT, effectively removing the insertion of 'Customer 2' and leaving the count as 1. ROLLBACK TO post_insert; rolls back to the saved point after the first insert, also undoing 'Customer 2' insertion and making the count 1. Therefore, the valid options are ROLLBACK; and ROLLBACK TO post_insert;.

Discussion
yaya32Options: BC

BC is correct as the word savepoint is optionnal.

jfc1Options: BC

E is invalid. BC is correct

McromeoOptions: BC

BC is correct

lucemqyOptions: BC

BC is the correct answer since SAVEPOINT is optional in ROLLBACK there's no such thing as COMMIT TO SAVEPOINT

JayamityOptions: BD

BD is correct answer.

zouve

All savepoints of the current transaction are deleted if you execute a COMMIT , or a ROLLBACK that does not name a savepoint.

DarnunOptions: BC

Voted for BC. SAVEPOINT word is optional, A rollbacks whole transaction, E is invalid as there's not such thing in COMMIT synthax.