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 -> 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: Gerard H. Pille <ghp_at_skynet.be>
Date: 1997/10/28
Message-ID: <01bce3c9$379d0420$d01beec3@pcghp>#1/1

Notice that this will select the first ten rows and order them by amount, NOT the first ten ordered by amount.

-- 
Kind reGards,

Gerard
(ghp_at_santens.be; ghp_at_skynet.be)

miguel <jmiguel_at_cet.pt> schreef in artikel
<01bce38e$4aa1a520$0a0a2c0a_at_jmiguel.cet.pt>...

>
>
> Michael G. Schneider <mgs_software_at_compuserve.com> wrote in article
> <01bce36a$2a60d980$0201dede_at_mum>...
> > 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
> >
>
> SELECT * FROM tbl ORDER BY amount WHERE ROWNUM<10
>
>
Received on Tue Oct 28 1997 - 00:00:00 CST

Original text of this message

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