LEFT JOIN

Include all left table rows, even without matches

Join

SQL

SELECT u.name, o.total
FROM users u
LEFT JOIN orders o ON u.id = o.user_id;

What each clause does

LEFT JOIN returns all rows from the left table (users) plus matching rows from the right. Non-matches get NULL for right-side columns.

Related tools

Other SQL examples