Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Restrict number of rows returned?

Re: Restrict number of rows returned?

From: tore <TBostrup_at_teamia.com>
Date: Fri, 29 Dec 2000 10:48:38 -0500
Message-ID: <Rl236.10$E%1.92@client>

Thanks, that'll do it.
Tore

Brian Tkatch <SPAMBLOCK.Maxwell_Smart_at_ThePentagon.com.SPAMBLOCK> wrote in message news:3a4cae83.3337036890_at_news.alt.net...
> On Fri, 29 Dec 2000 10:13:56 -0500, "tore" <TBostrup_at_teamia.com>
> wrote:
>
> >Is there a way in Oracle (8.0.5) to restrict the number of rows returned
> >from a query (using SQL Worksheet or SQL*Plus)?
> >
> >(Something similar to either SELECT TOP n * or SET ROWCOUNT n in SQL
> >Server).
> >
> >The restriction must be carried out on the server side since I am testing
> >some queries that return large result sets over a slow communications
 linkto
> >review the results of a "batch" application.
> >
> >
> You can use ROWNUM, which counts the amount of output lines.
>
> SELECT Moo FROM Cow WHERE ROWNUM < 5;
>
> Note, that as ROWNUM is output lines, using WHERE ROWNUM > 1 would
> never output any lines.
>
> Brian
Received on Fri Dec 29 2000 - 09:48:38 CST

Original text of this message

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