Re: Réf. : Re: [SQL] Left outer join

From: Richard Huxton <dev(at)archonet(dot)com>
To: ext-thierry(dot)templier(at)ccf(dot)com
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Réf. : Re: [SQL] Left outer join
Date: 2003-10-23 15:35:43
Message-ID: 200310231635.43348.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thursday 23 October 2003 14:39, ext-thierry(dot)templier(at)ccf(dot)com wrote:
> Hello,
>
> It doesn't work...

You don't say how. By the way, please try to reply to the list as well as
directly to the person.

> Have you examples on left outer join on a table that is
> a part of a table? THanks,

richardh=# select * from ta;
a | b
---+-----
1 | aaa
2 | bbb
3 | ccc
(3 rows)

richardh=# select * from tb;
c | d
---+-----
1 | fff
3 | ggg
(2 rows)

richardh=# SELECT a,b,c,d FROM (SELECT a,b FROM ta) AS one LEFT JOIN (SELECT
c,d FROM tb) AS two ON a=c;
a | b | c | d
---+-----+---+-----
1 | aaa | 1 | fff
2 | bbb | |
3 | ccc | 3 | ggg
(3 rows)

--
Richard Huxton
Archonet Ltd

Browse pgsql-sql by date

  From Date Subject
Next Message Matias Surdi 2003-10-23 18:12:22 Regular expression problem
Previous Message Chris Gamache 2003-10-23 15:29:44 Re: Query planner: current_* vs. explicit date