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 -> How to select top n rows from a table?

How to select top n rows from a table?

From: <xiebl_at_usa.net>
Date: Mon, 05 Apr 1999 12:54:52 GMT
Message-ID: <7eabqp$joc$1@nnrp1.dejanews.com>


Hi, everyone I'd like to select the first n rows of a table according to some reasons. For instance, I need to select the top 10 students with best scores in a class, by applying just one SQL statement. In fact, my C/S environment cannot stand the network traffic if I cannot do that neatly at the server end. I find Oracle privides ROWNUM psuedocolumn but the ORDER BY clause cannot be used in any subqueries. Do you know how to solve this problem? Please give me a hand.

Xie Binglong
Image Processing Group, Tsinghua University

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Mon Apr 05 1999 - 07:54:52 CDT

Original text of this message

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