Der er ingen FULL OUTER JOIN
i MySQL. Se 7.2.12. Forenkling af ydre samling
og 12.2.8.1. JOIN Syntaks
:
Du kan efterligne FULL OUTER JOIN
ved at bruge UNION (fra MySQL 4.0.0 til):
med to tabeller 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
med tre tabeller 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