Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to select a range of records by rownum?
In article <33382B18.111C_at_exesolutions.com>,
Daniel A. Morgan <dmorgan_at_exesolutions.com> wrote:
>> > "select rownum, user, email from clients where rownum >= 40" failed
>>
>> will never return any rows. Think about it, the first record returned
>> will have rownum = 1 which is not greater than 40 so is discarded. The
>> next record returned will still have rownum = 1 and again will be
>> discarded and so on.
>
>Wonderful. What's the solution?
Here's a solution:
Select RNUM, user, email
from (select rownum RNUM, user, email
from clients)
where RNUM >= 40
Regards,
Steve Cosner
Received on Wed Mar 26 1997 - 00:00:00 CST
![]() |
![]() |