Skip to content
RED SAG Skills
hardStudy question · answer published in SQL interview questions, so no pointssqldebugging

NOT IN with a NULL in the list

What does this query return?

-- customers: id 1, 2, 3
-- banned:    customer_id 2, NULL

SELECT id FROM customers
WHERE id NOT IN (SELECT customer_id FROM banned);
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions