출처: http://java.sun.com/products/jdbc/reference/faqs/index.html
No, but it is easy to find the number of rows. If you are using a scrollable result set, rs
, you can call the methods rs.last
and then rs.getRow
to find out how many rows rs
has. If the result is not scrollable, you can either count the rows by iterating through the result set or get the number of rows by submitting a query with a COUNT
column in the SELECT
clause.