nerdexam
Oracle

1Z0-809 · Question #250

Given the structure of the Student table: Student (id INTEGER, name VARCHAR) Given the records from the STUDENT table: ID NAME 102 Edwin 103 Edward 103 Edwin Given the code fragment: Connection conn…

The correct answer is B. The program prints Status: false and two records are deleted from the Student table. You've hit your session limit · resets 5:20pm (America/New_York)

Question

Given the structure of the Student table: Student (id INTEGER, name VARCHAR) Given the records from the STUDENT table: ID NAME 102 Edwin 103 Edward 103 Edwin Given the code fragment: Connection conn = DriverManager.getConnection(dbURL, userName, passWord); Statement st = conn.createStatement(); String query = "SELECT * FROM Student WHERE id = 103"; System.out.println("Status: " + st.execute(query)); Assume that: The required database driver is configured in the classpath. The appropriate database is accessible with the dbURL, userName, and passWord exists. What is the result?

Options

  • AThe program prints Status: true and two records are deleted from the Student table.
  • BThe program prints Status: false and two records are deleted from the Student table.
  • CA SQLException is thrown at runtime.
  • DThe program prints Status: false but the records from the Student table are not deleted.

How the community answered

(51 responses)
  • A
    4% (2)
  • B
    84% (43)
  • C
    10% (5)
  • D
    2% (1)

Explanation

You've hit your session limit · resets 5:20pm (America/New_York)

Community Discussion

No community discussion yet for this question.

Full 1Z0-809 Practice