Received: from mta3.snfc21.pbi.net (mta3.snfc21.pbi.net [206.13.28.141]) by hub.org (8.9.3/8.9.3) with ESMTP id EAA97410 for ; Mon, 25 Oct 1999 04:30:15 -0400 (EDT) (envelope-from postgres@weblynk.com) Received: from pinto.usedcars.com ([206.170.239.155]) by mta3.snfc21.pbi.net (Sun Internet Mail Server sims.3.5.1999.09.16.21.57.p8) with SMTP id <0FK5009QSGY182@mta3.snfc21.pbi.net> for pgsql-sql@postgreSQL.org; Mon, 25 Oct 1999 01:30:02 -0700 (PDT) Date: Mon, 25 Oct 1999 01:27:40 -0700 From: Postgres Subject: Limit doesn't work with select unions To: "pgsql-sql@postgresql.org" Message-id: <071a01bf1ec2$ce0cd760$9befaace@usedcars.com> MIME-version: 1.0 X-Mailer: Microsoft Outlook Express 5.00.2314.1300 Content-type: text/plain; charset="iso-8859-1" Content-transfer-encoding: 7bit X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 References: <38123272.955C19B9@OConnor.net> <3813AC47.81F5F5C5@home.com> X-Priority: 3 I'm doing the following query: select a.id, cfs.id from cfs where a.id = cfs.oid union select b.id, cfs.id from cfs where b.id = cfs.oid limit 1; The limit basically doesn't work. I get the maximum amount of rows back. I try the query select a.id, cfs.id from cfs where a.id = cfs.oid limit 1 union select b.id, cfs.id from cfs where b.id = cfs.oid limit 1; and psql says the syntax is incorrect. Any ideas on how to use limit with union queries? Thanks, Rich