Recall & Review
beginner
What does an INNER JOIN do in SQL?
An INNER JOIN returns only the rows where there is a match in both tables based on the specified condition.
Click to reveal answer
beginner
What is the purpose of the ON condition in an INNER JOIN?
The ON condition specifies how to match rows from the two tables, usually by comparing columns with related data.
Click to reveal answer
beginner
Write a simple INNER JOIN query to get matching rows from tables
Employees and Departments where Employees.DepartmentID equals Departments.ID.SELECT * FROM Employees INNER JOIN Departments ON Employees.DepartmentID = Departments.ID;
Click to reveal answer
beginner
If an INNER JOIN query returns zero rows, what does it mean about the data?
It means there are no matching rows between the two tables based on the ON condition.
Click to reveal answer
intermediate
Can you use multiple conditions in the ON clause of an INNER JOIN? How?
Yes, you can combine multiple conditions using AND or OR inside the ON clause to match rows more precisely.
Click to reveal answer
What does the ON clause specify in an INNER JOIN?
✗ Incorrect
The ON clause tells SQL how to find matching rows between the two tables.
What rows does an INNER JOIN return?
✗ Incorrect
INNER JOIN returns only rows where the ON condition finds matches in both tables.
Which SQL keyword is used to combine rows from two tables based on a condition?
✗ Incorrect
INNER JOIN combines rows from two tables based on the ON condition.
Can the ON condition use more than one column to match rows?
✗ Incorrect
You can combine multiple conditions in the ON clause using AND or OR.
If you want to join tables but keep all rows from the first table even if no match exists, should you use INNER JOIN?
✗ Incorrect
INNER JOIN only returns matching rows; LEFT JOIN keeps all rows from the first table.
Explain in your own words what an INNER JOIN with an ON condition does.
Think about how you find common friends between two groups.
You got /3 concepts.
Write a simple INNER JOIN query example and describe what it returns.
Use two example tables like Employees and Departments.
You got /4 concepts.