LEFT JOIN
LEFT JOIN is a SQL clause in the JOIN Types category. Returns ALL rows from the left table and matching rows from the right. Unmatched right rows show NULL. The syntax is SELECT * FROM table1 LEFT JOIN table2 ON table1.column = table2.column;. It returns all left table rows + matches. A typical example: SELECT e.name, d.dept_name FROM employees e LEFT JOIN departments d ON e.dept_id = d.id; -- All employees, even if no department A close relative is INNER JOIN, which returns only rows where there is a match in BOTH tables. The most common JOIN type. A close relative is RIGHT JOIN, which returns ALL rows from the right table and matching rows from the left. Opposite of LEFT JOIN. A close relative is FULL OUTER JOIN, which returns ALL rows from both tables. NULLs where no match exists. Not supported in MySQL. More about this category: Table join operations — INNER, LEFT, RIGHT, FULL, CROSS, SELF JOIN.