Re: Limiting Rows Returned in Query
Date: 1996/11/09
Message-ID: <562gkc$b7_at_news.istar.ca>#1/1
Alvin, try this:
select columna, columnb
from tablea where 1=1 and columnc > value and rownum <= 100;
Hope this helps, Rob.
Alvin Sylvain <alvin_at_c-square.com.nojunk> wrote:
>This may be a FAQ ... but I haven't seen it yet, so, what the hey.
>I want to be able to limit the number of rows returned in a query
>statement. I seem to recall something such as:
> select columna, columnb
> from tablea
> where 1=1
> and columnc > value
> and maxrows <= 100; <<<<<<<<<<<<<<<<
>However, I can not find anything like this in the documentation. (It's
>nice to be able to scan the entire CD-ROM, however, you have to know
>what you're looking for! It's like having a dictionary to help your
>spelling: if you don't know how to spell the word, you can't find it!
>Speaking of which, anyone know how to spell "Medeavil?" Ie, as in
>"Middle Ages"?)
>We're using Oracle 7.3.2 on Solaris 2.5.
>As a reference, this would be done as follows in Sybase 4.9:
> set rowcount 100 <<<<<<<<<<<<<<<<
> select columna, columnb
> from tablea
> where 1=1
> and columnc > value
> go
>Any help is appreciated. Please e-mail to:
> alvin_at_c-square.com
>The normal "reply-to" is supposed to be broken to discourage junk
>e-mail.
>Thanks!
>========================================================================
Received on Sat Nov 09 1996 - 00:00:00 CET