Received: from atmpe.omnitel.net (atmpe.omnitel.net [194.176.32.131]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f34E7N829810 for ; Wed, 4 Apr 2001 10:07:23 -0400 (EDT) (envelope-from asakmanas@grafton.lt) Received: from videomonster ([212.47.97.193]) by atmpe.omnitel.net (8.9.3/8.9.3) with SMTP id NAA10308 for ; Wed, 4 Apr 2001 13:04:08 +0200 From: =?iso-8859-4?Q?Algirdas_=A9akmanas?= To: Subject: outer joins Date: Wed, 4 Apr 2001 13:03:11 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-4" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200104/38 X-Sequence-Number: 2377 Hi all, I'm new to postgre, I've changed my work and consequently now i'm moving from MS plaform. In MS SQL there are such constructs left or right outer join, in postgres there are no such thing Can You offer me strategy to make query that selects from table (a) and joins to it another (b) on e.g. a.id=b.aid but joins so that in case there is no value in table b NULL is left in result: in MS SQL i've used query: select a.id, b.name from a left outer join b on a.id=b.aid table a table b id | aid | name ----------- ---------------- 1 1 | Tom 2 3 | Sam result: a.id | b.name --------------------- 1 | Tom 2 | NULL thank you in advance Algirdas Šakmanas IT manager +370 99 90369 asakmanas@grafton.lt Grafton Entertainment http://www.tvnet.lt