Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PUBLIC:Re: Top 10
Eugen Nyffeler wrote:
> rsenn wrote:
> >
> > While browsing through some Microsoft stuff the other day I ran
across a
> > SQL line that suggested one can SELECT TOP 10 or SELECT TOP 10% (or
> > other number). I'm not aware of equivalent features for use in
> > Oracle. Are there?
>
> Try:
>
> Select *
> from xyz
> where rownum <= 10
>
> and you get the first 10 rows of the select result
>
> rgds
> eugen
Dear Eugen, Wouldn't this pull out the first 10 records encountered? If "top" ten are considered the first ten, then this would be an answer, but how about if "top" ten are the ten of greatest numerical value, as in ten largest budgets or 10 highest paid employees?
All the best,
Randall
Received on Mon Dec 29 1997 - 00:00:00 CST