Full outer join
A full outer join returns all joined rows from both tables, plus one row for each unmatched left row (extended with nulls on the right), plus one row for each unmatched right row (extended with nulls on the left).
SELECT * FROM cows_one FULL OUTER JOIN cows_two ON cows_one.cnumber =
cows_two.cnumber;
cnumber | cbreed | cnumber | breeds
----------- +------------+ ---------+---------
1 | Holstein | |
2 | Guernsey | 2 | Jersey
3 | Angus | 3 | Brown Swiss
| | 4 | Ayrshire
(4 rows)