var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Selecting a specific portion of records from a query
Suppose, I've executed a select query which results say 1000 records.
I want to fetch these records in multiple resultsets.
That is, I may want to get only from 1st to 50th record;
or from 600th to 800th record likewise...
(Better take the example of a search engine, which displays the results in
And I want to specify this range in the query itself.
First of all, is it possible? If yes then how?
Anybody please explain the syntax for the above sql query.
Last edited by srinivas_vja; 05-25-05 at 08:10.
Reason: to increase views
Yes, this is commonly requried for pagination in web-based apps:
Just set the bind variables :first_rec and :last_rec to the required values and run the query.
select ename, deptno, job
( select ename, deptno, job, rownum rn
( select ename, deptno, job
order by ename
) where rownum <= :last_rec
) where rn >= :first_rec;