🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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 →
  1. Q1. Which join returns only rows that have a match in BOTH tables?
  2. Q2. Table A has 5 rows and B has 4 rows. How many rows does A CROSS JOIN B return?
  3. Q3. How do you find customers who have NEVER placed an order?
  4. Q4. To list each employee with their manager's name from ONE employees table, you use a:
  5. Q5. After a LEFT JOIN, what value appears in the right table's columns for unmatched rows?
  6. Q6. How many rows does departments LEFT JOIN employees ON e.deptid = d.deptid return for the company tables?
  7. Q7. How many rows does a FULL OUTER JOIN of employees and departments on deptid return here?
  8. Q8. After employees e LEFT JOIN departments d ON ..., you add WHERE d.deptname = 'Sales'. What happens to Arjun's row?
  9. Q9. MySQL has no FULL OUTER JOIN. How is it usually written there?
  10. Q10. What usually happens if the ON condition is forgotten in a join of two large tables?