Ask a Question
Advertise on boostr.in
Organizational Research By
Surprising Reserch Topic
Experts Most Trusted Topic
jdbc pagination using -'java,sql,jdbc,pagination'
jdbc pagination ¬†using -'java,sql,jdbc,pagination'
I want to implement pagination using JDBC. The actual thing I want to know is "How can i get first 50 and then next 50 records from database for page 1 and 2 respectively"
My Query is Select * from data [data table contains 20,000 rows]
For page #1 I get 50 records and for page #2 I want to get next 50 records. How can I implement it efficiently in JDBC?
I have searched and found that rs.absolute(row) is the way to skip first page records but it takes some amount of time on large result sets and I don't want to bear this amount of time. Also, I don't want to use rownum and limit + offset in query because these are not good to use in query, I dont know why, still I don't want to use it in query.
Can anyone help me how to get limited ResultSet for pagination or is there any way JDBC is giving us?
Sep 7, 2015
to add a comment.
Related Hot Questions
Walkin Jobs Opening
Government Jobs Opening