Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to duplicate set fetchrows?
In article <p9dmes8507etbcr1b33jrbfpisdi8j7idn_at_4ax.com>,
kenmn_at_tds.net wrote:
> Thanks for your help.
>
> I used to use "set fetchrows 200" to limit the number of rows returned
> in SQL*Worksheet, but it doesn't seem to work in 8.1.6.
>
> Anyone have any insight into how to accomplish the same thing.
>
> Rownums won't work because they get rearranged durring sorts.
>
In 8.1.5 and above you can:
select * from
( select * from T where ... ORDER BY ... )
where rownum <= 200
/
the order by will be done prior to the where rownum and it'll work.
> Best,
>
> Ken Sproule
> kenmn_at_tds.net
>
> Ken Sproule
> kenmn_at_tds.net
>
--
Thomas Kyte tkyte_at_us.oracle.comOracle Service Industries
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Apr 05 2000 - 08:22:08 CDT
![]() |
![]() |