Why doesn't SQL support “= null” instead of “is null”?

前端 未结 12 2057
不知归路
不知归路 2020-11-29 11:11

I\'m not asking if it does. I know that it doesn\'t.

I\'m curious as to the reason. I\'ve read support docs such as as this one on Working With Nu

12条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-29 11:24

    The concept is that NULL is not an equitable value. It denotes the absence of a value.

    Therefore, a variable or a column can only be checked if it IS NULL, but not if it IS EQUAL TO NULL.

    Once you open up arithmetic comparisions, you may have to contend with IS GREATER THAN NULL, or IS LESS THAN OR EQUAL TO NULL

提交回复
热议问题