Re: JOIN of a table with many detail tables - Mailing list pgsql-general

From Gregory Wood
Subject Re: JOIN of a table with many detail tables
Date
Msg-id 005901c0a274$ee7dc5e0$7889ffcc@comstock.com
Whole thread Raw
In response to JOIN of a table with many detail tables  (DaVinci <bombadil@wanadoo.es>)
List pgsql-general
>  I want to make a LEFT JOIN of table A with detail tables B and C. How can
I
>  make that?:
>
>   SELECT A.*, B.*, C.* FROM A LEFT JOIN B ON A.foo = B.bar ???????
>
>  I don't know where to put info of JOIN between A and C.
>
>  Any help, please? Thanks.

SELECT * FROM A LEFT JOIN B ON A.foo = B.bar LEFT JOIN C ON A.foo = C.bar

Should do it.

Greg


pgsql-general by date:

Previous
From: Denis Perchine
Date:
Subject: Re: Postgres eats up memory when using cursors
Next
From: Brian Kurt Fujikawa
Date:
Subject: insert into table from C/C++ application