Re: How to limit # of rows returned by SELECT

From: Stephen Ellis Lasley <slasley_at_lgc.com>
Date: 1996/02/26
Message-ID: <3131E8DE.63E1_at_lgc.com>#1/1


Chuck Isaacson wrote:
>
> What product accepts 'set rowcount' syntax?? My version of sqlplus for oracle
> 7.1.6 doesn't like it.

Both SQL Server and Sybase / Watcom let you use it...

>
> Jason Lincoln (jlincoln_at_mailhost.onramp.net) wrote:
> : In your select use the constraint where rownum < some_number
> :
> : In article <Pine.SOL.3.91.960208160943.3865C-100000_at_mail>,
> : hrothenb_at_mail.bcpl.lib.md.us says...
> : >
> : >Before the select use the
> : > set rowcount 50
> : >command.
> : >
> : >On Thu, 8 Feb 1996, Screemin! wrote:
> : >
> : >>
> : >> Does anybody know if there is a way to limit the number of records
> : >> returned by a SELECT statement? I have a large ODBC database
 

> : >> I tried SELECT *, COUNT(*) FROM TABLE WHERE COUNT(*) <=50
> : >> but of course this didn't work, nor should it logically.
  Received on Mon Feb 26 1996 - 00:00:00 CET

Original text of this message