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

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -