nerdexam
Oracle

1Z0-819 · Question #48

1Z0-819 Question #48: Real Exam Question with Answer & Explanation

Sign in or unlock 1Z0-819 to reveal the answer and full explanation for question #48. The question stem and answer options stay visible for context.

Question

Assume db is a DataSource and the EMP table is defined appropriately. try (Connection conn = ds.getConnection(); PreparedStatement ps = conn.prepareStatement("INSERT INTO EMP VALUES(?, ?, ?)")) { ps.setObject(1, 101, JDBCType.INTEGER); ps.setObject(2, "SMITH", JDBCType.VARCHAR); ps.setObject(3, "HR", JDBCType.VARCHAR); ps.executeUpdat e(); ps.setint(1, 102); ps.setString(2, "JONES"); ps.executeUpdate(); } What does executing this code fragment do?

Options

  • AInserts two rows (101, 'SMITH', 'HR') and (102, 'JONES', NULL)
  • BInserts two rows (101, 'SMITH', 'HR') and (102, 'JONES', 'HR')
  • CInserts one row (101, 'SMITH', 'HR')
  • DThrows a SQL Exception

Unlock 1Z0-819 to see the answer

You've previewed enough free 1Z0-819 questions. Unlock 1Z0-819 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 1Z0-819 Practice