MySQL - NULL safe NOT equal operator

前端 未结 4 816
隐瞒了意图╮
隐瞒了意图╮ 2020-12-03 06:58

I am just curious - I know about NULL safe equal operator <=>, but is there some NULL safe NOT equal operator? Or I have to always use something like this

4条回答
  •  旧时难觅i
    2020-12-03 07:41

    I found that NOT (NULL <=> 1) works and I think it is also ISO standard compliant, but is cumbersome. A better way to show using column names would be like this: NOT (tbl.col1 <=> 1)

提交回复
热议问题