Received: from maggie.eskom.co.za (mail-spool2-1.eskom.co.za [147.110.52.115]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eA182xl22171 for ; Wed, 1 Nov 2000 03:03:02 -0500 (EST) (envelope-from Marc.Rohloff@eskom.co.za) Received: from eskom.co.za (gw.eskom.co.za [147.110.52.108]) by maggie.eskom.co.za (8.11.1/8.11.1/check_local4.1) with SMTP id eA182jj03637 for ; Wed, 1 Nov 2000 10:02:45 +0200 X-Spam-Filter: check_local by digitalanswers.org Received: from ROUTING-Message_Server by eskom.co.za with Novell_GroupWise; Wed, 01 Nov 2000 10:02:47 +0200 Message-Id: X-Mailer: Novell GroupWise Internet Agent 5.5.3.1 Date: Wed, 01 Nov 2000 10:02:22 +0200 From: "Marc Rohloff" To: Subject: Outer Joins Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.postgresql.org id eA1838l22181 X-Archive-Number: 200011/1 X-Sequence-Number: 32 I've been looking at the open-source databases for a project I am working on and while reading about Postgres I saw that they do not support outer joins yet. I was intrigued by their solution of using a union query. Something Like: select a.col1, b.col2 from a,b where a.col1 = b.col2 union select a.col1, NULL from a where a.col1 not in (select b.col2 from b) But I was wondering if the following would work (it does in some other databases) select a.col1, b.col2 from a,b where a.col1 = b.col2 or b.col2 is null or maybe even select a.col1, b.col2 from a,b where a.col1 = b.col2 or a.col1 not in (select b.col2 from b) These would seem to be far more efficient than a union query (I would try this but I don't have a Unix box at the moment to install PostgreSQL on!) Marc Rohloff