Re: "left join" not working?

From: Louis-David Mitterrand <vindex+lists-pgsql-sql(at)apartia(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: "left join" not working?
Date: 2010-02-12 11:57:47
Message-ID: 20100212115747.GA21659@apartia.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, Feb 12, 2010 at 11:35:02AM -0000, Oliveiros C, wrote:
> My first guess is that
> NULL fails the condition on your WHERE clause,
> p.id_line = 1
>
> So your WHERE clause introduces an additional level of filtering
> that filters out the NULLs coming from the LEFT JOIN...

So, if I understand correctly, a WHERE filters all results regardless of
join conditions and can turn an OUTER JOIN into an INNER JOIN.

Thanks for pointing that out!

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Oliveiros C, 2010-02-12 12:17:35 Re: "left join" not working?
Previous Message msi77 2010-02-12 11:57:10 Re: "left join" not working?