Oracle
1Z0-809 · Question #272
1Z0-809 Question #272: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-809 to reveal the answer and full explanation for question #272. The question stem and answer options stay visible for context.
Question
Given the information: Emp table has 10 records.
Given the code fragment:
try (Connection con = DriverManager.getConnection ("Connection_String")); {
Statement stmt = con.createStatement (ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY);
ResultSet rs = stmt.executeQuery ("SELECT * FROM EMP"); {
// Line n1
}
Which code fragment, inserted at Line n1, helps you determine the number of records in ResultSet?
Options
- Ars.getMetaData().getRowCount();
- Bint totRows=0; while(rs.next()) {totRows++;}
- Crs.last(); int totRows = rs.getRowCount();
- Drs.last(); int totRows = rs.getRowId(1);
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.