FULL JOIN (also written as FULL OUTER JOIN) combines the results of LEFT JOIN and RIGHT JOIN. It produces a result set that contains:- Every row from the left table- Every row from the right table- NULLs in place of missing columns where no match existsIf a row in the left table has no corresponding row in the right table, the right-side columns are NULL. Conversely, if a row in the right table has no match in the left table, the left-side columns are NULL.Because FULL JOIN can return many NULLs, downstream aggregations should handle NULL carefully. Performance depends on indexes on the join columns. Some database systems (e.g., MySQL) lack native FULL JOIN support and require UNION of LEFT and RIGHT joins to emulate the behavior.
- table2
(Identifier) - the second table to join- join_condition
(Boolean expression) - criteria that define matching rows (ON or USING clause)INNER JOIN, LEFT JOIN, RIGHT JOIN, CROSS JOIN, UNION, JOIN condition
SQL-92 standard
LEFT JOIN returns all rows from the left table plus matching rows from the right. FULL JOIN returns every row from both tables.
Yes. Adding the word OUTER is optional and does not change the result.
Use LEFT JOIN UNION ALL RIGHT JOIN with a WHERE filter to remove duplicates because MySQL lacks built-in FULL JOIN.
It can on large datasets. Ensure join columns are indexed and retrieve only needed columns to mitigate performance costs.