Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL - Selecting top n rows
John Wells schrieb:
>
> Help! I've got limited SQL knowledge, and need to get the top n rows of a
> query. In MS Access (bleargh!) it's easy:
>
> SELECT TOP n name, age
> FROM person
> ORDER BY age DESC;
>
> But from what I can see, Oracle has no 'TOP' (non-standard?).
>
So, is there an easy way to do this on Oracle?
Yes, take a look at Jurij Modic's solutions: (BTW, this question arrises often. Just take a look at dejanews news archive next time.)
Couple of possible ways to do it...
HTH
Matthias
--
Matthias.Gresz_at_Privat.Post.DE
Always log on the bright side of life.
http://www.stone-dead.asn.au/movies/life-of-brian/brian-31.htm
Received on Tue Dec 01 1998 - 02:57:04 CST