There is a method getColumnCount in the JDBC API. Is there a similar method to find the number of rows in a ResultSet?
There is no way to find the number of rows in a ResultSet and even if such a method was present, the result would be inaccurate because the setFetchSize and setMaxRows methods would affect the number rows present in the ResultSet . Best way to get number of rows for a particular statement is executing another query, applying count function on the main query.