Re: JOIN of a table with many detail tables

From: "Gregory Wood" <gregw(at)com-stock(dot)com>
To: "DaVinci" <bombadil(at)wanadoo(dot)es>
Cc: "PostgreSQL-General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: JOIN of a table with many detail tables
Date: 2001-03-01 17:27:45
Message-ID: 005901c0a274$ee7dc5e0$7889ffcc@comstock.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2001-03-01 18:12:16 Re: Postgres eats up memory when using cursors
Previous Message Denis Perchine 2001-03-01 17:25:38 Re: Postgres eats up memory when using cursors