Why NOT IN (NULL) Always returns nothing
问题 I have following table: And following simple query: SELECT * FROM dbo.Calendars WHERE calname NOT IN(NULL) My question is why always NOT IN(NULL) return nothing? PS :No matter what is your table,if you add NOT IN(NULL) to any column's condition,result is nothing. Thank you in advance :) 回答1: Because value equals NULL is not defined, and will never evaluate to True. Check This post on bad practices. Don't use IN and NULL , use EXISTS to test for at least one row where something exists. 回答2: