Using NOT IN with NULL Values in T-SQL
Recently I discovered a little quirk in T-SQL when using NOT IN with NULL values in the list of values to check. I use the term “quirk” loosely here because the behavior is exactly as designed in SQL Server, though it may not be obvious. Using NOT IN with NULL Values Here’s how it works. If you use a static…