Skip to content
Advertisement

MS SQL handling null values same as strange string

I have a view V_BaseData_Extract in MS SQL server with one column Comments having null values as well having other textual values too. Column type is nvarcahr.

What’s happening is that SQL returning same count for both below mentioned queries.

First Query:

Second Query:

Its handling null same as the string mentioned in my first query’s where condition. What could be the reason behind that ? Am I missing something ?

Is null equivalent to some number of blank spaces ?

Advertisement

Answer

This is the correct explanation. Comments above helped me look into right direction and search relevant terms.

NULL values inside NOT IN clause

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement