1
SQLIntermediate#joins
INNER JOIN returns only matching rows. LEFT/RIGHT JOIN returns every row of one side plus matches (NULLs otherwise). FULL OUTER JOIN returns both sides. CROSS JOIN returns the Cartesian product. SELF JOIN joins a table to itself.
SELECT e.name, d.name FROM employees e LEFT JOIN departments d ON d.id = e.dept_id; -- employees without a department still appear, d.name IS NULL