Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: top N or rewriting MAX
otierney_at_freenet.edmonton.ab.ca wrote:
>
> Does anyone know of good (ie FAST) ways of getting the top
> N rows in a table?
>
Create a view on the distinct value of the column required (to get the sequence), then select from the viewname where rownum < n+1;
Alan Wilson Help fight continental drift. ======================================================================Received on Wed Jan 08 1997 - 00:00:00 CST