HomeJdbc How to Get the row count from ResultSet in JDBC Facebook Twitter ResultSet rs = stmt.executeQuery("select count(*) from Student"); rs.last(); //Moving the cursor to the last row System.out.println("Table contains "+rs.getRow()+" rows"); rs.beforeFirst(); //back to initial state Tags Jdbc Facebook Twitter
Post a Comment