testing inequality with columns that can be null

后端 未结 8 1142
不思量自难忘°
不思量自难忘° 2021-02-05 14:48

So, I asked a question this morning, which I did not phrase correctly, so I got a lot of responses as to why NULL compared to anything will give NULL/FALSE.

My actual q

8条回答
  •  无人及你
    2021-02-05 15:54

    If

    where ((A=B) OR (A IS NULL AND B IS NULL))
    

    is for equality, then why just not use:

    where NOT (
      ((A=B) OR (A IS NULL AND B IS NULL))
    )
    

    for inequality?

提交回复
热议问题