Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How can I bring the recordset count inside the same recordset?

539442Dec 29 2006 — edited Dec 29 2006
I have a query inside a procedure where I'm paging the results.
I dont know how to bring the total results inside the recordset.
How can I bring the recordset count inside the same recordset?

SELECT *
FROM ( select a.*, rownum rnum
FROM (SELECT
*
FROM table
ORDER BY id DESC) a
WHERE rownum <= pg*50 )
WHERE rnum > (pg-1)*50
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 26 2007
Added on Dec 29 2006
9 comments
586 views