Question: Given the table books in the figure and a ResultSet created by running the following SQL statement, which option prints the value 379? SELECT *
Given the table books in the figure and a ResultSet created by running the following SQL statement, which option prints the value 379?

SELECT * FROM books WHERE title = 'Beginning Java'
A. System.out.println(rs.getInt(1));
B. System.out.println(rs.getInt(2));
C. System.out.println(rs.getInteger(1));
D. System.out.println(rs.getInteger(2));
title varchar(255) Beginning Java Advanced Java num_pages integer 379 669
Step by Step Solution
3.51 Rating (158 Votes )
There are 3 Steps involved in it
To print the value 379 from the ResultSet you need to call the appropriate method to get the value f... View full answer
Get step-by-step solutions from verified subject matter experts
