🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Checking AI-Written SQL: all 10 questions

Quiz: Checking AI-Written SQL · Question 4 of 10

Why does WHERE branch != 'CSE' leave out a student whose branch is NULL?

Why does WHERE branch != 'CSE' leave out a student whose branch is NULL?

  1. A.NULL is treated as 'CSE'
  2. B.SQLite deletes NULL rows
  3. C.!= only works on numbers
  4. D.Comparing with NULL gives unknown, which WHERE treats as not true
Answer & explanation

Correct answer: Comparing with NULL gives unknown, which WHERE treats as not true

Handle NULLs explicitly, e.g. branch IS NULL OR branch != 'CSE'.

Can you get the rest right without peeking?

Take the timed Quiz: Checking AI-Written SQL quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →