Why Ansi_nulls does not work?

前端 未结 2 914
时光取名叫无心
时光取名叫无心 2020-12-22 05:36

Assume that I have 2 tables named aTable1, aTable2

aTable1 has userID set to identity and contains the following data:

userID  email          FirstNa         


        
2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-22 05:51

    It is documented that it won't work:

    SET ANSI_NULLS ON affects a comparison only if one of the operands of the comparison is either a variable that is NULL or a literal NULL. If both sides of the comparison are columns or compound expressions, the setting does not affect the comparison.

提交回复
热议问题