From: "Kevin A Lewis" <Kevin_A_Lewis@Hotmail.com>
Subject: Re: Limiting the number of returned rows with Oracle
Date: 2000/06/06
Message-ID: <9W2%4.10$574.1171@newreader.ukcore.bt.net>#1/1
References: <393C7E63.345F9DE8@tanyelcp650.brightware.com>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
X-Trace: newreader.ukcore.bt.net 960281349 195.171.206.98 (Tue, 06 Jun 2000 09:49:09 BST)
Organization: BOCM PAULS LTD.
X-MSMail-Priority: Normal
NNTP-Posting-Date: Tue, 06 Jun 2000 09:49:09 BST
Newsgroups: comp.databases.oracle.server


adding the clause 'where rownum < 5'

will have the effect of only returning 4 rows.

However in the relational world there is no guarantees as to which rows
these will be. You may need to 'order' them if you need to pick out either
end of a sequence.

Regards

--
Kevin A Lewis (BOCM PAULS LTD) - Animal Feed Manufacturer - Ipswich United
Kingdom)
                        <Kevin_A_Lewis@Hotmail.com>

The views expressed herein by the author of this document
are not necessarily those of BOCM PAULS Ltd.
<converse@tanyelcp650.brightware.com> wrote in message
news:393C7E63.345F9DE8@tanyelcp650.brightware.com...
> Is there a way to limit the number of returned records to a given number
> with Oracle with SQL?
>
> Something like: "select * from table and return first five rows"
>
> thanks,
>
> Cem
>
>
>




