SET ANSI_NULLS ON
SET ANSI_NULLS ON is a T-SQL command that sets the database option ANSI_NULLS to ON. When ANSI_NULLS is set to ON, any comparison or operation involving NULL values will result in a NULL value. This means that if any operand in a comparison or operation is NULL, the result will be NULL.
For example, if you have a table with a column that contains NULL values and you run a query to find all rows where the column equals a specific value, the query will not return any rows if ANSI_NULLS is set to ON. This is because any comparison involving a NULL value will result in a NULL value, which is not equal to any other value, including itself.
It is recommended to keep ANSI_NULLS set to ON for compatibility with other systems and to avoid unexpected behavior in queries.
Prev:畜禽肉的自溶现象本质上就是腐败,应该避免