Re: Left outer join on multiple tables

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: "David Witham" <davidw(at)unidial(dot)com(dot)au>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Left outer join on multiple tables
Date: 2004-01-11 19:55:33
Message-ID: 200401112055.33714.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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 ...

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message azwa 2004-01-12 01:07:41 Re: Missing data for column
Previous Message Greg Sabino Mullane 2004-01-11 19:17:26 Re: Different query results in psql and Perl DBI with Postgres 7.2.1