SQL Join Visualizer
Visualize SQL JOIN types. Generate JOIN queries. Understand inner, left, right, full outer, and cross joins with examples.
Select Join Type
Table Configuration
Generated SQL
SELECT * FROM employees INNER JOIN departments ON employees.dept_id = departments.id;
INNER JOIN Explanation
Description: Only matching rows from both tables
Result: A ∩ B
Use Case: Find records with relationships
Visual Diagram
A (employees)
A ∩ B
B (departments)
Returns intersection of both circles
JOIN Types Reference
INNER JOIN: Only matching rows from both tables. Result: A ∩ B. Find records with relationships
LEFT JOIN: All rows from left, matching from right. Result: A + (A ∩ B). Keep all left records, get right if exists
RIGHT JOIN: All rows from right, matching from left. Result: B + (A ∩ B). Keep all right records, get left if exists
FULL JOIN: All rows from both tables. Result: A ∪ B. Combine all records, show missing as NULL
CROSS JOIN: Every combination of rows. Result: A × B. Generate all possible pairs
Tips
Use aliases for readability: FROM employees e JOIN departments d. Select specific columns instead of *. Use WHERE after JOIN for filtering. Multiple JOINs: chain with additional JOIN clauses. Index join columns for performance. NULL in LEFT/RIGHT/FULL where no match.