Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to select top n rows from a table?
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