Why does NULL = NULL evaluate to false in SQL server

前端 未结 19 1610
一向
一向 2020-11-22 05:02

In SQL server if you have nullParam=NULL in a where clause, it always evaluates to false. This is counterintuitive and has caused me many errors. I do understa

19条回答
  •  悲&欢浪女
    2020-11-22 05:43

    NULL isn't equal to anything, not even itself. My personal solution to understanding the behavior of NULL is to avoid using it as much as possible :).

提交回复
热议问题