2 ms·
I wouldn't do this myself, but I can see how this pretty much gets you everything you need. LEFT and RIGHT joins are mirror images, so as we mostly read-L-to-R
by karmakaze 5y ago
I wouldn't do this myself, but I can see how this pretty much gets you everything you need. LEFT and RIGHT joins are mirror images, so as we mostly read-L-to-R prefer LEFT. Both inner and outer joins are useful. It's worth noting that putting any WHERE condition on the right table-expression columns of a LEFT JOIN makes it into an inner join unless the condition is `IS NULL`. If you have no particular condition but want an inner join, you can always add right_table.id IS NOT NULL.
I've met brilliant people with idiosyncrasies, so I'd chalk it up to a consistency/single-point-of-variance choice where only the WHERE clauses sets the join-type. I'd be curious to know if the clauses that change the join type always came first.
My pet peeve is writing LEFT OUTER JOIN, there's no such thing as a LEFT INNER JOIN so it's just noise--please stop.