🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.It is kept with NULLs
  2. B.It is removed, because NULL = 'Sales' is not true, so the LEFT JOIN behaves like an INNER JOIN
  3. C.It causes an error
  4. 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 →