Agreed. Also, isn't the JOIN clause better for optimization? I've read somewhere that it's better for the optimizer to check the relation between rows before filtering the results with WHERE clause, because a simple WHERE condition to join tables produces a cartesian result which is THEN filtered.
I've read similar things, and used to be of that opinion because of how queries are processed. However, I've never seen any meaningful results from it in my experience.
That of course only means that I haven't bothered to look deeper than just that. However, because of how dangerous it is to mix up the ON conditions VS WHERE conditions when you do an OUTER join of some kind, I just keep this theory to myself rather than confuse anyone.
13
u/askur Feb 11 '14
These are not all SQL joins, just the equi-joins. Joins are not conditioned on the '=' operator alone (although it is the most common case).
Still the best visualization I know of, and I still use it. Along with this caveat. ;)