RIGHT and FULL JOIN

RIGHT JOIN keeps all rows of the right table, the mirror of LEFT JOIN. FULL JOIN (or FULL OUTER JOIN) keeps the rows from both sides, with NULLs where there is no match. They are used less often than LEFT JOIN, and some engines do not support them.

Example

SELECT * FROM a FULL JOIN b ON a.id = b.id;

Related concepts

The whole glossary