Mysql JOIN types
Considering the fact I'm not growing any younger and start forgetting things, here's a very short hands on self reminder article about mysql join types.
equivalent to simple
LEFT OUTER JOIN
JOIN
SELECT stuff FROM a JOIN b ON a.x = b.yreturns only records from
a that have correspondent in b LEFT JOIN
SELECT stuff FROM a LEFT JOIN b ON a.x = b.yreturns all records from
a, no matter if they have correspondent in b or notRIGHT JOIN
SELECT stuff FROM a RIGHT JOIN b ON a.x = b.yreturns all records from
b, no matter if they have correspondent in a or notINNER JOIN
equivalent to simple
JOINLEFT OUTER JOIN
RIGTH OUTER JOIN
OUTER is needed for ODBC compatibility. it doesn't do anything.