nerdexam
Oracle

1Z0-819 · Question #102

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

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

Question

Consider the method declaration: public void setSessionUser(Connection conn, String user) throws SQLException { Statement stmt = conn.createStatement(); String sql = "<EXPRESSION>"; stmt.execute(sql); } Is A or B the correct replacement for <EXPRESSION> and why? A. SET SESSION AUTHORIZATION "" + stmt.enquoidetifier(user) B. SET SESSION AUTHORIZATION "" + user Is A or B the correct replacement for <EXPRESSION> and why?

Options

  • AA, because it sends exactly the value of user provided by the calling code.
  • BB, because it sends exactly the value of user provided by the calling code prevents SQL injection.
  • CA and B are functionally equivalent.
  • DA, because it is unnecessary to enclose identifiers in quotes.
  • EB, because all values provided by the calling code should be unquoted.

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