Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to select top n rows from a table?

Re: How to select top n rows from a table?

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 8 Apr 1999 20:38:59 +0100
Message-ID: <923600848.6168.0.nnrp-03.9e984b29@news.demon.co.uk>


And it is likely to fail if STUDENTS is a parallel table.

--

Jonathan Lewis
Yet another Oracle-related web site: www.jlcomp.demon.co.uk

Clark Morrow wrote in message <7egun9$6gf$1_at_news.kodak.com>...
>Interesting...
>Michael Myers wrote in message <37097D2F.E0145D2C_at_blazenet.net>...
>
>>SQL> create view student_view as select score, name
>> 2 from students
>> 3 group by score, name;
>>
>>SQL> select rownum, name, score
>> 2 from student_view
>> 3 where rownum < 4;
>>
>> ROWNUM NAME SCORE
>>--------- --------------- ---------
>> 1 Jake 15
>> 2 Fred 20
>> 3 Joe 50
>>
>>Group by may be 'cheating', but since students should be unique it
>>should work....
Received on Thu Apr 08 1999 - 14:38:59 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US