Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> SQL Problem - Retrieving first n sorted rows
Hello all,
I have seen a few references to queries which retrieve the first N rows of a table in various FAQs on the web. I am however, trying to retrieve the N rows of a table with the smallest values of a certain column.
e.g.
Table : Full_Rec
Columns : Rec_Key (key)
Doc_Number Doc_Title
I would like the titles of the 50 lowest Doc_Numbers (the table is sorted by Rec_Key, and not by Doc_Number of course).
I am using Oracle 7.3.3. and PL/SQL 2.3.3.
Thank you in advance for any solutions,
Best regards,
Ariel Kirson
Ex Libris.
Received on Thu Oct 22 1998 - 09:33:13 CDT