I have the following pagination request
SELECT * FROM (SELECT e.*, ROWNUM row_num FROM (SELECT emp_no, emp_name, dob from emp) outr WHERE ROWNUM < ( (pagenum * row_size) + 1)) WHERE row_num >= ( ( (pagenum - 1) * row_size) + 1)
I would like to get the number of rows in the same query, and for that I tried using
COUNT(*) OVER ()
however, I do not get accurate results when I paginate the next set of pages and lines.
How can I use COUNT(*) OVER () effectively?
sql oracle oracle10g pagination
user75ponic
source share