Search Postgresql Archives

Difference between ON and WHERE in JOINs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux