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.
创作工场
免责声明:
以上内容除特别注明外均来源于网友提问,创作工场回答,未经许可,严谨转载。
点击这里>>使用🔥专业版,更聪明、更完整、更原创!