In the MySQL documentation for joins, a coworker pointed out this gem to me today:
RIGHT JOIN
works analogously toLEFT JOIN
. To keep code portable across databases, it is recommended that you useLEFT JOIN
instead ofRIGHT JOIN
.
Is anyone able to shed some light on this? This strikes me as probably a remnant of a past age - as in maybe the documentation means to say "To keep code reverse compatible with earlier versions of MySQL..."
Is there a modern RDBMS that doesn't support RIGHT JOIN
? I get that RIGHT JOIN
is syntactic sugar over LEFT JOIN
, and any RIGHT JOIN
can be expressed as a LEFT JOIN
, but there are times when readability suffers if you write a query in that direction.
Is this advice still modern and valid? Is there a compelling reason to avoid RIGHT JOIN
?