Re: How to limit # of rows returned by SELECT

From: Fernando Nantes de Souza <nantes_at_amix.com.br>
Date: 1996/03/08
Message-ID: <31405B79.7161_at_amix.com.br>#1/1


David wrote:
>
> >> : >> I tried SELECT *, COUNT(*) FROM TABLE WHERE COUNT(*) <=50
> >> : >> but of course this didn't work, nor should it logically.
>
> You try again with:
>
> SELECT * FROM TABLE HAVING COUNT([field]) <=50

There is a pseudo-column in Oracle that can help you. Try the following:

        SELECT * FROM TABLE WHERE ROWNUM <= 50; Received on Fri Mar 08 1996 - 00:00:00 CET

Original text of this message