How to find number of rows in the ResultSet object?

Number of rows in table JDBC There is no direct method in JDBC. In JDBC 1.0, the only way available is using while loop with a counter as follows. Example on number of rows in table JDBC with JDBC 1.0 style ResultSet res = stmt.executeQuery(“select * from Employee”); int counter = 0; while(res.next()) { counter++; …

How to find number of rows in the ResultSet object? Read More »