Skip to main content

SQL JOIN Visualizer

Explore all SQL JOIN types with live Venn diagrams, SQL queries, and sample data results.

A B

SQL Query
 
Table A (employees)
idnamedept_id
1Alice10
2Bob20
3Carol30
4DaveNULL
Table B (departments)
iddept_name
10Engineering
20Marketing
40Finance
Result

Frequently Asked Questions

What is the difference between INNER JOIN and LEFT JOIN?▼

INNER JOIN returns only rows where the join condition matches in BOTH tables. LEFT JOIN (LEFT OUTER JOIN) returns all rows from the left table plus matched rows from the right table — unmatched right-side columns are NULL. Use LEFT JOIN when you want to keep all left-table rows regardless of whether there's a match.

What is a CROSS JOIN?▼

CROSS JOIN produces the Cartesian product — every row from the left table paired with every row from the right table. A 5-row table CROSS JOINed with a 4-row table produces 20 rows. Usually accidental (missing ON clause); intentional uses include generating test data or combinations.

What is a SELF JOIN?▼

A SELF JOIN joins a table with itself, using table aliases. Common use cases: employee-manager hierarchies, finding duplicate rows, comparing rows within the same table. Example: SELECT e.name, m.name AS manager FROM employees e JOIN employees m ON e.manager_id = m.id.

When should I use FULL OUTER JOIN?▼

FULL OUTER JOIN returns all rows from both tables, with NULLs where there's no match. Use it when you want to see non-matching rows from both sides — for example, finding records in Table A that have no match in Table B AND records in Table B with no match in Table A simultaneously.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →