Re: Setting maximum rows to be selected

From: Anton Dischner <dischner_at_med.uni-meunchen.de>
Date: Tue, 16 Aug 1994 11:06:15 +0200
Message-ID: <dischner-1608941106150001_at_gkc12a.klch.med.uni-muenchen.de>


In article <32h6ip$1rn_at_ionews.io.org>, negandhi_at_io.org (Neil Negandhi) wrote:

add the

... where rownum <= 20;

clause in your statement

Best regards,

Toni

> I'm running PowerBuilder Enterprise with an Oracle 7.0 back end. What I
> want to know is if it's possible to limit the number of rows a select
> statement returns. For example, a fairly complex select returns order
> information based on several tables, a sub-select, and use of the
> group by statement. Out of the 100 or so rows returned, I would like to
> display the top 20 orders based on the revenue field (which is derived
> from a group sum expression).
>
> Neil Negandhi
> negandhi_at_io.org

+--------------------------------------------------------------------+
| Anton Dischner, DBA and system-programmer    Phone: +49 89 70953202|
| Institut fuer Klinische Chemie               Fax  : +49 89 70958888|
| Klinikum Grosshadern                         Home : +49 89 6254060 |
| Ludwig Maximilians Universitaet Muenchen     Handy: +49 172 8388880|
| 81366 Muenchen                                                     |
| Marchioninistr. 15                                                 |
| Germany                          Mail: dischner_at_med.uni-muenchen.de|
 +--------------------------------------------------------------------+
Received on Tue Aug 16 1994 - 11:06:15 CEST

Original text of this message