= (Equals) (Transact-SQL)
Compares the equality of two expressions (a comparison operator).
When you compare two NULL expressions, the result depends on the ANSI_NULLS setting:
If ANSI_NULLS is set to ON, the result is NULL, following the ANSI convention that a NULL (or unknown) value is not equal to another NULL or unknown value.
If ANSI_NULLS is set to OFF, the result of NULL compared to NULL is TRUE.
Comparing NULL to a non-NULL value always results in FALSE.