Beginner Topic 15 of 51 Databases
Inner and Outer Joins
Joins differing in how unmatched rows are handled.
How it works
INNER JOIN keeps matching rows only; LEFT JOIN keeps all left rows with NULLs where no match; RIGHT and FULL OUTER are analogous. CROSS JOIN gives every pair.
Where it is used
Customers with or without orders.
Common pitfall
Filtering the right table in WHERE after a LEFT JOIN turns it into an inner join; put it in ON.
Where it fits in the course
Inner and Outer Joins is topic 15 of 51 in Databases, rated Beginner. It follows Joins. The next topic is Entity-Relationship Modeling.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Databases quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Databases quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Inner and Outer Joins?
Joins differing in how unmatched rows are handled. It belongs to Databases and is a beginner-level topic.
Where do people use Inner and Outer Joins?
Customers with or without orders.
What is the most common mistake with Inner and Outer Joins?
Filtering the right table in WHERE after a LEFT JOIN turns it into an inner join; put it in ON.
What should I learn before this topic?
Start with Joins, the topic just before it in Databases.
How can I practice it?
Answer the mini quiz in the interactive lesson, then take the Databases quiz.
Is Inner and Outer Joins hard to learn?
It is a Beginner topic, so it works as an entry point. If the terms are new, read the explanation twice and try the visualizer before the quiz.
How long does it take to learn Inner and Outer Joins?
Most learners can read the explanation and finish the interactive lesson in under an hour. Fluency comes from applying the idea, so plan a few short practice sessions with the quiz.
Which topics are related to Inner and Outer Joins?
Joins, Entity-Relationship Modeling, GROUP BY and HAVING are closely connected. The full list is in the related topics section of this page.
What should I study after Inner and Outer Joins?
Continue with Entity-Relationship Modeling, the next topic in Databases.
Related topics
- Joins (Databases)
- Entity-Relationship Modeling (Databases)
- GROUP BY and HAVING (Databases)
- Data Types in SQL (Databases)