Keep all rows from the left side even when no match exists.
Section: Querying, Joins, and Aggregation
Left join
sql
sql
SELECT c.customer_id, o.order_id
FROM customers c
LEFT JOIN orders o ON o.customer_id = c.customer_id;Explanation
See summary for usage details.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Querying, Joins, and Aggregation