-
Contributing Member
how to use paging in sql
i have an sql query which return huge results(about milion recods) and i want to print it in html browser. How can i use sql for paging so that i can retrieve first 100 results ,the next 100 results..and so on........
----------------------
suresh
-
Expert Member
Re: how to use paging in sql
You might have find solution to ur question. Anyway let me give mine(ORACLE),
you can achieve this by the use of ROWNUM.
let us assume that the following query is ur query
select column_list from from_list where where_list;
you need to use the following query for paging,
select * from
(select column_list,ROWNUM rank from from_list where where_list)a
where rank between :1 and :2;
where :1 and :2 are starting and ending record numbers of the current page....
Hope this helps u...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules