java - JDBC ResultSet total rows -


I am implementing paging in my application. For this, I run a query and get a result.
Now I have to get the total number of records in this resultant for my paging calculation.
How do I get it? I do not want to execute additional SQL, which gives me the total line.

Add another option to count query as a sub query column in your query if your database is slightly If it is small, then it will execute only once. You will be able to use the query analyzer easily in your preferred database.

  Selection ID, user name, (users select number (ID) from users;  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -