INNER JOIN
INNER JOIN is a SQL clause in the JOIN Types category. Returns only rows where there is a match in BOTH tables. The most common JOIN type. The syntax is SELECT * FROM table1 INNER JOIN table2 ON table1.column = table2.column;. It returns matching rows from both tables. A typical example: SELECT e.name, d.dept_name FROM employees e INNER JOIN departments d ON e.dept_id = d.id; -- Only employees that belong to a department A close relative is LEFT JOIN, which returns ALL rows from the left table and matching rows from the right. Unmatched right rows show NULL. 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.