NOT IN with a NULL in the list
QuizMedium-Hard
In employees, the top manager has a NULL manager_id, and four employees manage at least one person. The part in brackets is a subquery, which is a query inside another query. What does this query return?
SELECT name FROM employees WHERE id NOT IN (SELECT manager_id FROM employees);
- No rows
- The six employees who manage nobody
- An error, because the subquery returns a NULL
- Every employee
This question is part of Pro+
Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.