← All topics
Quiz: SQL Joins: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. Which join returns only rows that have a match in BOTH tables?
- Q2. Table A has 5 rows and B has 4 rows. How many rows does A CROSS JOIN B return?
- Q3. How do you find customers who have NEVER placed an order?
- Q4. To list each employee with their manager's name from ONE employees table, you use a:
- Q5. After a LEFT JOIN, what value appears in the right table's columns for unmatched rows?
- Q6. How many rows does departments LEFT JOIN employees ON e.deptid = d.deptid return for the company tables?
- Q7. How many rows does a FULL OUTER JOIN of employees and departments on deptid return here?
- Q8. After employees e LEFT JOIN departments d ON ..., you add WHERE d.deptname = 'Sales'. What happens to Arjun's row?
- Q9. MySQL has no FULL OUTER JOIN. How is it usually written there?
- Q10. What usually happens if the ON condition is forgotten in a join of two large tables?