Oracle
1Z0-809 · Question #270
Given the EMPLOYEE table: EMP_ID | EMP_NAME -------|--------- 100 | Tom 101 | Mary 102 | Peter 103 | Robin Given the code fragment: try (Connection con = DriverManager.getConnection (dbURL, user…
The correct answer is C. A new record is inserted and Employee id: 102, Employee Name: Peter is displayed. You've hit your session limit · resets 5:20pm (America/New_York)
Question
Given the EMPLOYEE table:
Given the code fragment:
try (Connection con = DriverManager.getConnection (dbURL, user, passwd)); {
Statement stmt = con.createStatement (ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
ResultSet rs = stmt.executeQuery ("SELECT * FROM employees");
rs.absolute (3); // Line1
rs.moveToInsertRow();
rs.updateInt(1, 104);
rs.updateString(2, "Michael");
rs.insertRow();
rs.moveToCurrentRow();
System.out.println ("Employee Id: " + rs.getInt(1) + ", Employee Name: " +
rs.getString(2));
}
Assuming the database supports scrolling and updating, what is the result?
| EMP_ID | EMP_NAME |
|---|---|
| 100 | Tom |
| 101 | Mary |
| 102 | Peter |
| 103 | Robin |
Options
- AThe program throws a runtime exception at Line 1.
- BA compilation error occurs.
- CA new record is inserted and Employee id: 102, Employee Name: Peter is displayed.
- DA new record is inserted and Employee id: 104, Employee Name: Michael is displayed.
How the community answered
(19 responses)- A5% (1)
- B5% (1)
- C79% (15)
- D11% (2)
Explanation
You've hit your session limit · resets 5:20pm (America/New_York)
Community Discussion
No community discussion yet for this question.