Er is geen FULL OUTER JOIN
in MySQL. Zie 7.2.12. Externe join-vereenvoudiging
en 12.2.8.1. JOIN-syntaxis
:
U kunt FULL OUTER JOIN
emuleren gebruikmakend van UNION (vanaf MySQL 4.0.0):
met twee tabellen t1, t2:
SELECT * FROM t1
LEFT JOIN t2 ON t1.id = t2.id
UNION
SELECT * FROM t1
RIGHT JOIN t2 ON t1.id = t2.id
met drie tabellen t1, t2, t3:
SELECT * FROM t1
LEFT JOIN t2 ON t1.id = t2.id
LEFT JOIN t3 ON t2.id = t3.id
UNION
SELECT * FROM t1
RIGHT JOIN t2 ON t1.id = t2.id
LEFT JOIN t3 ON t2.id = t3.id
UNION
SELECT * FROM t1
RIGHT JOIN t2 ON t1.id = t2.id
RIGHT JOIN t3 ON t2.id = t3.id