Very confusing discovery. I have an int field , say A, that has -1, null and other numerals.
Where I run a query like below,
Select * from mytable where A <> -1 and B = 'Bob' , I get no rows returned. Are -1 and null the same in MS SQL 2012??
When I do either of below, I get the one row which has Bob
select * from mytable where B='Bob'
select * from mytable where (A is null or A <> -1) and B='Bob'