X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 47A84D1D56A for ; Sun, 11 Jan 2004 19:56:05 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 17287-04 for ; Sun, 11 Jan 2004 15:55:35 -0400 (AST) Received: from curie.credativ.org (credativ.com [217.160.209.18]) by svr1.postgresql.org (Postfix) with ESMTP id 72BD0D1D54F for ; Sun, 11 Jan 2004 15:55:33 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by curie.credativ.org (Postfix) with ESMTP id 2843A5626B; Sun, 11 Jan 2004 20:55:34 +0100 (CET) Received: from colt.pezone.net (dsl-213-023-254-001.arcor-ip.net [213.23.254.1]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by curie.credativ.org (Postfix) with ESMTP id 2E1B75623C; Sun, 11 Jan 2004 20:55:33 +0100 (CET) From: Peter Eisentraut To: "David Witham" , Subject: Re: Left outer join on multiple tables Date: Sun, 11 Jan 2004 20:55:33 +0100 User-Agent: KMail/1.5.1 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200401112055.33714.peter_e@gmx.net> X-Virus-Scanned: by AMaViS at credativ.com X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/84 X-Sequence-Number: 16477 David Witham wrote: > Is there a way to do left outer joins on more than 2 tables at once > (3 in my case)? Or do I have to do the first join into a temp table > and then another join from the temp table to the third table? I can't > seem to work out the syntax from the User Guide. SELECT * FROM a LEFT JOIN b ON (...) LEFT JOIN c ON c WHERE ...