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: Limit lines from a query

Re: Limit lines from a query

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 2000/03/11
Message-ID: <952785888.27745.0.pluto.d4ee154e@news.demon.nl>#1/1

The only way seems to be (and this will work only in 8i and upwards) select *
from
(select ...
 from ...
 order by ...
)
where rownum < n

Hth,

Sybrand Bakker, Oracle DBA

Franz-Josef Vorspohl <fj.vorspohl_at_gmx.de> wrote in message news:38CA4961.18CEFABC_at_gmx.de...
> Hi,
>
> > Hi use
> >
> > rownum<11
>
> I get a error message, if ein use HAVING rownum < 11in the SQL statement
>
> it is possible to limit the lines from a query like
>
> select a, sum(b) from tab
> group by a
> order by sum(b) desc
>
>
> having rownum < 11
> down work
>
> any ideas?
>
>
Received on Sat Mar 11 2000 - 00:00:00 CST

Original text of this message

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