Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Q: How to select 20th to 100th rows?
You can do this:
select * from (select rownum seq, mytable.* from mytable) where seq between 25 and 250
This assumes you don't care that the records are not ordered, you just want the 25th thru 250th as they come from the database.
Amit Bhati wrote:
>
> Say, I have a table with 1000 records in it. I have two numbers, x = 25
> and y = 250. I want to select the 26th. to 250th. rows of this table.
>
> In SQL how can I do this without using a SEQUENCE column in the table?
>
> E-mailed replies much appreciated. Thanks,
>
> --
> amit bhati
Received on Thu Aug 14 1997 - 00:00:00 CDT