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 -> How Do I Get the Top 50 from a Query?

How Do I Get the Top 50 from a Query?

From: <anthony.savoca_at_spcorp.com>
Date: Fri, 24 Jul 1998 13:27:10 GMT
Message-ID: <6pa23d$jft$1@nnrp1.dejanews.com>


I am writing a query with PL/SQL and I want to get only the top 50 records returned in the result set. I could use a cursor to go through the results and stop after 50, but I was hoping there might be a way in PL/SQL to only get the top 50 returned to me. This way I could use a select in the from clause to get only the data I need. I guess it would work similar to the TOP clause in Access. Any ideas would be appreciated. If you could, please respond via email. If I get a good solution, I'll repost it to this group. Thanks!!

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Fri Jul 24 1998 - 08:27:10 CDT

Original text of this message

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