Tuesday 4 September 2018

SQL Query does not return NULL values ​​after comparing the result with zero

I am using MSSQL 2008. I was trying to do something like this :

select  Name, AcctBal
from Table1
where AcctBal <> '0.00'

Why does this query, not return the AcctBal with NULL values?

this is because NULL isn't a specific nummeric value or any other value. If you would also like to view te records that have NULL, you should change your where statement to : where AcctBal <> '0.00' or AcctBall is null

0 comments:

Post a Comment