mysql full join code example
Example 1: MySql FULL OUTER JOIN
-- MySql FULL OUTER JOIN
SELECT * FROM t1
LEFT JOIN t2 ON t1.id = t2.id
UNION ALL
SELECT * FROM t1
RIGHT JOIN t2 ON t1.id = t2.id
WHERE t1.id IS NULL
Example 2: full outer join in sql
FULL OUTER JOIN:
is used when retrieving data from
multiple tables and will return both
table records, matching and non-matching.