Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Top 10 rows from a sorted resultset
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