An outer join keeps rows that do not have a matching value in the other table. A full outer join keeps unmatched rows from both tables, filling missing columns with null values. section 9.2 section 9.2.4
Keep every promotion and every order
SELECT p.PromotionCode, oh.OrderID FROM promotion p FULL OUTER JOIN orderheader oh ON p.PromotionID = oh.PromotionID; A promotion without an order appears with a null OrderID; an order without a matching promotion appears with a null PromotionCode. Matching rows contain values from both tables. section 9.2.4
Choose the join type according to which unmatched rows matter:
- Use LEFT JOIN to preserve every row from the left table. section 9.2.4
- Use RIGHT JOIN to preserve every row from the right table. section 9.2.3
- Use FULL OUTER JOIN when both tables must contribute unmatched rows. section 9.2.4
FULL JOIN may be accepted as a shorter spelling, but support varies by database system. MySQL, MariaDB, and SQLite do not support this join type here. section 9.2.4

