← Quiz: SQL Joins: all 10 questions
Quiz: SQL Joins · Question 8 of 10
After employees e LEFT JOIN departments d ON ..., you add WHERE d.deptname = 'Sales'. What happens to Arjun's row?
After employees e LEFT JOIN departments d ON ..., you add WHERE d.dept_name = 'Sales'. What happens to Arjun's row?
- A.It is kept with NULLs
- B.It is removed, because NULL = 'Sales' is not true, so the LEFT JOIN behaves like an INNER JOIN
- C.It causes an error
- D.It becomes a Sales employee
Answer & explanation
Correct answer: It is removed, because NULL = 'Sales' is not true, so the LEFT JOIN behaves like an INNER JOIN
Filters on the right table belong in the ON clause if unmatched rows must be kept.
Can you get the rest right without peeking?
Take the timed Quiz: SQL Joins quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →