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

Home -> Community -> Usenet -> c.d.o.server -> Re: Limiting the resultset returned from a SELECT to the first N rows?

Re: Limiting the resultset returned from a SELECT to the first N rows?

From: H. Fellinghauer <hfr-NOSPAM-_at_metzler.com>
Date: 1997/10/28
Message-ID: <3455C322.7143@metzler.com>#1/1

Michael G. Schneider wrote:
>
> I would like to write a SELECT statement and limit the number of returned
> rows. Something like
>
> SELECT * FROM tbl ORDER BY amount TOP 10
>
> Is this possible?
>
> Michael G. Schneider
>
> mgs_software_at_compuserve.com

Hi Michael!

Try the following:
  SELECT * FROM tbl WHERE rownum < 10 ORDER BY amount;

HTH.
  Harry

-- 
                                                      ///
  Hiroshima '45   Chernobyl '86   Windows '95        (O O)
-------------------------------------------------oOO--(_)--OOo---------
  "There is more than one way to do it!"

(Remove -NOSPAM- from my email address)
Received on Tue Oct 28 1997 - 00:00:00 CST

Original text of this message

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