Oracle
1Z0-809 · Question #250
1Z0-809 Question #250: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-809 to reveal the answer and full explanation for question #250. The question stem and answer options stay visible for context.
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.
Unlock 1Z0-809 to see the answer
You've previewed enough free 1Z0-809 questions. Unlock 1Z0-809 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.