Converter Web ToolsConverter WebTools

SQL Joins Explained (INNER, LEFT, RIGHT, FULL)

This SQL joins reference explains the join types used to combine rows from two or more tables — INNER, LEFT, RIGHT, FULL OUTER, CROSS and SELF joins.

Join typeReturns
INNER JOINOnly rows with a match in both tables
LEFT JOINAll rows from the left table + matched right (NULL if none)
RIGHT JOINAll rows from the right table + matched left
FULL OUTER JOINAll rows from both tables, matched where possible
CROSS JOINEvery combination of both tables (Cartesian product)
SELF JOINA table joined to itself

Example

SELECT * FROM orders o INNER JOIN customers c ON o.customer_id = c.id; — returns orders that have a matching customer.

Related tools & charts