Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSQLEXISTS vs INSingle-choice MCQ

A subquery is used with NOT IN against a column that contains NULLs. What is the surprising result?

SELECT name FROM products p WHERE p.id NOT IN ( SELECT discontinued_id FROM archive ); -- archive.discontinued_id contains a NULL