Difference between ON and WHERE in JOINs - Mailing list pgsql-general

From Jean-Christophe Boggio
Subject Difference between ON and WHERE in JOINs
Date
Msg-id 50590FEF.3000406@thefreecat.org
Whole thread Raw
Responses Re: Difference between ON and WHERE in JOINs
List pgsql-general
I'm looking for an article that explains the difference between these
constructs IN POSTGRESQL (the rules seem to differ from one DB to another) :

SELECT A.*
FROM A
JOIN B ON a.id=b.id AND A.somefield='somevalue'

and

SELECT A.*
FROM A
JOIN B ON a.id=b.id
WHERE A.somefield='somevalue'


I have noticed big differences though I don't know the rules and I've
been bitten several times recently. Time to learn.

Thanks,

JC


pgsql-general by date:

Previous
From: Chris Travers
Date:
Subject: Re: foreign key from array element
Next
From: David Johnston
Date:
Subject: Re: Difference between ON and WHERE in JOINs