Received: from bologna.nettuno.it (bologna.nettuno.it [193.43.2.1]) by hub.org (8.9.3/8.9.1) with ESMTP id JAA74201 for ; Thu, 29 Apr 1999 09:58:12 -0400 (EDT) (envelope-from jose@sferacarta.com) Received: from proxy.sferacarta.com (mail@sfcabop1.nettuno.it [193.207.10.213]) by bologna.nettuno.it (8.8.6/8.8.6/NETTuno 3.1) with ESMTP id PAA00673; Thu, 29 Apr 1999 15:57:35 +0200 (MDT) Received: from rosso.sferacarta.com (sferacarta.com) [10.20.30.5] by proxy.sferacarta.com with esmtp (Exim 2.05 #1 (Debian)) id 10ct9p-00006K-00; Thu, 29 Apr 1999 15:55:25 +0000 Message-ID: <372864D6.7FF6C7A0@sferacarta.com> Date: Thu, 29 Apr 1999 15:55:34 +0200 From: =?iso-8859-1?Q?Jos=E9?= Soares X-Mailer: Mozilla 4.5 [it] (Win95; I) X-Accept-Language: it MIME-Version: 1.0 To: Mark Jewiss CC: Chris Bitmead , hackers Subject: Re: [SQL] LIMIT References: Content-Type: multipart/alternative; boundary="------------2013054E88F122D7B5067125" --------------2013054E88F122D7B5067125 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Mark Jewiss ha scritto: > > > Could someone give me an example of a select * with LIMIT > > > used by 6.5? > > > > SELECT * FROM foobar LIMIT 100 > > Or you could use ROWCOUNT... > > set rowcount = 10 > select * from table > > Regards, > > Mark. > -- > Mark Jewiss > Knowledge Matters > Limited-------------------------------------------------------------- I don't know nothing about ROWCOUNT. SET ROWCOUNT doesn't work for me. hygea=> set rowcount = 10; ERROR: parser: parse error at or near "10" PostgreSQL still accepts SET QUERY_LIMIT but it doesn't work... hygea=> set query_limit to '1'; SET VARIABLE hygea=> select * from contatori; tipologia|tabella |contatore|contatorebis ---------+---------------+---------+------------ SOTTO |Modena | 1| 2 SOPRA |prestazioni | 20| (2 rows) -------------------------------------------------------------- PostgreSQL 6.5.0 on i586-pc-linux-gnu, compiled by gcc 2.7.2.3 ----------------------------------------------------------------------------------- José --------------2013054E88F122D7B5067125 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Mark Jewiss ha scritto:
> > Could someone give me an example of a select * with LIMIT
> > used by 6.5?
>
> SELECT * FROM foobar LIMIT 100

Or you could use ROWCOUNT...

set rowcount = 10
select * from table

Regards,

Mark.
--
Mark Jewiss
Knowledge Matters Limited--------------------------------------------------------------


I don't know nothing about ROWCOUNT.
SET ROWCOUNT doesn't work for me.
hygea=> set rowcount = 10;
ERROR:  parser: parse error at or near "10"

PostgreSQL still accepts SET QUERY_LIMIT but it doesn't work...

hygea=> set query_limit to '1';
SET VARIABLE
hygea=> select * from contatori;
tipologia|tabella        |contatore|contatorebis
---------+---------------+---------+------------
SOTTO    |Modena         |        1|           2
SOPRA    |prestazioni    |       20|
(2 rows)
--------------------------------------------------------------
PostgreSQL 6.5.0 on i586-pc-linux-gnu, compiled by gcc 2.7.2.3
-----------------------------------------------------------------------------------
José --------------2013054E88F122D7B5067125--