SQL Join Basics and Join Types
Core SQL join types with practical examples, NULL behavior, and quick rules for correct join selection.
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all
## Join types at a glance
## Quick rules
More in SQL Joins
SQL Join Patterns and Pitfalls
Common SQL join mistakes, reusable templates, and correctness rules for production queries.
Join Performance, EXPLAIN, and Optimization
SQL join tuning with indexes, plan inspection, row reduction, and troubleshooting guidance.
Aggregation After Joins and NULL Handling
Counting, summing, pre-aggregating, and handling NULLs correctly after one-to-many and outer joins.
Semi-Joins and Anti-Joins
High-value EXISTS, IN, NOT EXISTS, and LEFT JOIN IS NULL patterns for membership and missing-row queries.
Many-to-Many Joins and Bridge Tables
Many-to-many SQL join patterns with bridge tables, aggregation, filtering, and index guidance.
Self Joins and Hierarchies
SQL self join examples for managers, duplicates, comparisons, and basic hierarchy modeling.