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

Home -> Community -> Usenet -> c.d.o.misc -> Top 10 rows from a sorted resultset

Top 10 rows from a sorted resultset

From: BVince2172 <bvince2172_at_aol.comPRO>
Date: 22 Aug 2002 15:53:52 GMT
Message-ID: <20020822115352.23900.00000859@mb-bk.aol.com>


Using Oracle 8i, how would I return the first n rows in a query after an order by? In Transact-SQL there's TOP, but as far as I am aware this isn't available in Oracle.

It's simple enough to do without the order by:

SELECT Name, DOB
FROM tMyTable
WHERE rownum <11

...to return the first 10 rows, but with an order by the results are ordered AFTER cutting the first 10 rows. Received on Thu Aug 22 2002 - 10:53:52 CDT

Original text of this message

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