INNER JOIN
Question
What does INNER JOIN return?
Hint
INNER JOIN is the most common join type.
Explanation
INNER JOIN returns only rows that have matching values in both tables. SELECT * FROM orders INNER JOIN customers ON orders.customer_id = customers.id returns rows where the order customer_id matches a customer id. If a customer has no orders or an order has no matching customer, those rows are excluded. INNER JOIN is symmetric — A INNER JOIN B is the same as B INNER JOIN A. Use JOIN keyword (INNER is default).
Related Resources
Related Lessons
- JOINs
Learn JOINs.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.