Re: Limitting number of rows returned from a select.
Date: 1996/06/15
Message-ID: <31C273F0.CBA_at_worldnet.att.net>#1/1
Bryan Grenn wrote:
>
> All,
>
> We have a customer who is converting from RDB to Oracle. In
> RDB they can limit the select to retrieve say the first 200
> rows through part of the select clause.
>
> Is there any way to do this in an Oracle Select clause,
>
> and
> In what versions is this available (if it is )?
Sure... You can use the ROWNUM pseudocolumn to limit the number of rows returned by a query.
e.g
select * from <table_name>
This will return the first 200 rows.
However your customer needs to keep in mind that conditions testing for ROWNUM values greater than 1 are
where ROWNUM < 200 .
I'm pretty sure this functionality is supported in all versions subsequent to 7.0 (including 7.0).
I think v6 also supports this.
Naresh. Received on Sat Jun 15 1996 - 00:00:00 CEST