SQL JOIN Visualizer

SQL JOIN Visualizer

Updated August 21, 2026

SQL JOIN visualizer online. See INNER, LEFT, RIGHT, FULL, CROSS, SEMI, and ANTI joins with sample tables and result rows. Free SQL join explainer.

Sample data stays the same so you can compare join types. Users 1–3 on the left, orders on the right (including an order for missing user 4).

users

idname
1Alice
2Bob
3Carol

orders

iduser_idtotal
10120
11135
12450

Match

Only rows that match on both sides. Bob, Carol, and the orphan order drop out.

SQL

SELECT u.id AS user_id, u.name, o.id AS order_id, o.total
FROM users u
INNER JOIN orders o ON o.user_id = u.id;

Result (2 rows)

user_idnameorder_idtotal
1Alice1020
1Alice1135

Features

  • Interactive INNER, LEFT, RIGHT, FULL, CROSS, SEMI, and ANTI joins
  • Fixed sample tables so the result is predictable
  • Generated SQL you can copy
  • Venn-style match highlighting
  • Result grid with NULLs called out
  • Runs entirely in this tab

Common Use Cases

  • Teach INNER vs LEFT JOIN with a concrete example
  • Remember why FULL OUTER JOIN needs NULLs on both sides
  • See NOT EXISTS (anti join) vs LEFT JOIN ... IS NULL
  • Explain CROSS JOIN row counts before someone ships one

Joins combine row sets

A JOIN matches rows from two tables. INNER keeps matches only. LEFT keeps every left row (NULL on the right when nothing matches). RIGHT is the mirror. FULL OUTER keeps both leftovers. CROSS is a cartesian product: no ON clause, row count multiplies.

SEMI (EXISTS) returns left rows that have at least one match, once. ANTI (NOT EXISTS) returns left rows with no match. MySQL 8 and Postgres 15+ also have matching JOIN syntax in some engines; EXISTS works everywhere.

Examples

Valid - INNER JOIN
FROM users u INNER JOIN orders o ON o.user_id = u.id
Valid - Anti join
FROM users u WHERE NOT EXISTS (SELECT 1 FROM orders o WHERE o.user_id = u.id)

Frequently Asked Questions

What is the difference between INNER JOIN and LEFT JOIN?

INNER JOIN drops left rows with no match. LEFT JOIN keeps them and fills right-hand columns with NULL. Toggle the visualizer to see Alice (has orders) vs Bob (none).

Does SQLite support RIGHT and FULL JOIN?

SQLite 3.39+ supports RIGHT and FULL OUTER JOIN. Older builds do not. Rewrite RIGHT as a LEFT with the tables swapped if you need to support old SQLite.

When should I use EXISTS instead of JOIN?

When you only need to know a match exists, not the matching rows. EXISTS (semi join) avoids duplicating the left row per match.

Tips

  • Filter the right table in ON, not WHERE, if you want a LEFT JOIN to stay a left join. WHERE o.id IS NULL is the anti-join exception.
  • CROSS JOIN of two large tables is how you lock up a database. Check counts first.