← Quiz: SQL Interview Queries: all 10 questions
Quiz: SQL Interview Queries · Question 9 of 10
Which query lists employees who have no manager?
Which query lists employees who have no manager?
- A.SELECT name FROM employees WHERE manager_id IS NULL
- B.SELECT name FROM employees WHERE manager_id = NULL
- C.SELECT name FROM employees WHERE manager_id = 0
- D.SELECT name FROM employees GROUP BY manager_id
Answer & explanation
Correct answer: SELECT name FROM employees WHERE manager_id IS NULL
NULL must be tested with IS NULL; here it returns Asha.
Can you get the rest right without peeking?
Take the timed Quiz: SQL Interview Queries quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →