Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: retrieving only n rows
Which 400 are significant? The answer depends on the exact nature of your problem.
If you only want 400 rows from the resultset and you don't care which rows these are then use the rownum construct.
If you want the TOP 400 look for this query on deja or orafaq.com, you should be aware that where rownum < 401 doesn't return the top 400 results from your resultset.
If you want only distinct values consider using the distinct keyword.
Also you should very seriously consider upgrading from 8.04 to either 8.06 or to 8.16/8.17
-- Niall Litchfield Oracle DBA Audit Commission UK "Karol Brejna" <kazelot_at_thenut.eti.pg.gda.pl> wrote in message news:Pine.LNX.4.33.0103221214090.1931-100000_at_thenut.eti.pg.gda.pl...Received on Mon Mar 26 2001 - 01:40:39 CST
> I use Oracle 8.0.4.
>
> I have a select which gives me thousends of rows but
> only 4 houndred of them is significant to me.
>
> How can I tell Oracle to retrieve only 400 rows (and no more)?
>
>
> Thank you,
> Karol Brejna
>
>
![]() |
![]() |