Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Limit lines from a query
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
![]() |
![]() |