Reputation: 21
select * from tblCustomerAdmin
where ReqCon=null or ReqCon=0
Even though I've got data where ReqCon
=NULL
, I'm not getting any rows displayed.
Upvotes: 0
Views: 77
Reputation: 20265
If you want to check if a value is NULL
you have to use IS NULL
, because comparison operators (=
, !=
) return UNKNOWN
if either or both arguments are NULL
:
SELECT * FROM tblCustomerAdmin
WHERE ReqCon IS NULL OR ReqCon=0
Upvotes: 2
Reputation: 2453
select * from tblCustomerAdmin where ReqCon is NULL or ReqCon =0
Upvotes: 2