🧲SQL JOIN Type Selection Guide

Compute five JOIN types from your own two tables

Actual join result

The table above is not a copied example: the join is computed from the two tables you entered. A blank cell or a cell reading NULL is treated as SQL NULL and therefore matches nothing on either side. CSV values containing commas or quotes are not supported.

You Might Also Need

Choosing a JOIN for the situation in front of you

Pick a join type, paste both tables as they are, and you get the result row count, the actual joined rows and a block of SQL that expresses the same join. The result table is computed from your input on the spot rather than copied from a worked example, so you can edit rows and watch the difference immediately.

INNER keeps only matching rows, so neither side ever gets a NULL. LEFT keeps every left row and fills the right-hand columns with NULL where no partner exists, and RIGHT does the reverse. FULL OUTER keeps both sides, and CROSS builds every combination with no condition, making the row count the product of the two tables. Cells filled with NULL are marked in red in the table.

When a join value repeats, pairs multiply and the result grows beyond the input row count; the matching-pair count is reported separately so you can see why. A row whose join column is NULL pairs with nothing. As of October 2026 this page supports neither CSV values containing commas nor WHERE and GROUP BY clauses.

Frequently Asked Questions

Which side ends up with NULL?

In a LEFT JOIN the right-hand columns go NULL for unmatched left rows, and a RIGHT JOIN is the mirror image. FULL OUTER produces NULL on both sides, while INNER and CROSS produce none at all.

Why does the result have more rows than the left table?

Because a repeated join value lets one row pair with several. In the default sample the right table carries the same department id twice, so that employee appears twice.

What happens when the join column is NULL?

NULL is not considered equal even to another NULL, so such a row pairs with nothing. In a LEFT JOIN the row still survives, with the right-hand columns filled with NULL.