sql - NULL comparison, take 2 -
sql - NULL comparison, take 2 -
i have subquery, used in section:
a.column <> b.column unfortunately, doesn't work, if either a.column or b.column null. so, converted to:
((a.column <> b.column) or ((a.column null) <> (b.column null))) , presuming "table.column null" boolean value , can compare 2 boolean values. but...
incorrect syntax near '<'.
i don't like
((a.column <> b.column) or ((a.column null) , (b.column not null)) or ((a.column not null) , (b.column null))) how workarounf this?
regards,
nullif yields null when 2 values equal =)
where nullif(a.column, b.column) not null sql sql-server comparison null
Comments
Post a Comment