Home » Oracle » 1z0-804 » What is the result of the employees table has no records before the code executed?
Given the code fragment:
What is the result of the employees table has no records before the code executed?
A. 1 Sam
B. 4 Jack
C. 3 John
4 Jack
D. 1 Sam
3 John
4 Jack
Correct Answer: C
Explanation/Reference:
Explanation:
AutoCommit is set to false. The two following statements will be within the same transaction.
stmt.executeUpdate("insert into employees values(1,’Sam’)");
stmt.executeUpdate("insert into employees values(2,’Jane’)");
These two statements are rolled-back through (the savepoint is ignored! the savepoint must be specified (e.g. conn.rollback(save1); ) in the rollback if you want to rollback to the savepoint):
conn.rollback() ;
The next two insert statements are executed fine. Their result will be in the output.
Download Printable PDF. VALID exam to help you PASS.
|
|