The AnsiNulls property reports the NULL acceptance behavior for new columns.
object.AnsiNulls [= value]
Part | Description |
---|---|
object | Expression that evaluates to an object in the Applies To list |
value | True or False |
By default, Microsoft® SQL Server™ creates columns that do not accept NULL when the user does not explicitly declare the ability to accept NULL. Further, SQL Server returns TRUE when evaluating the expression NULL = NULL. These default behaviors are nonstandard.
When AnsiNulls is True, new columns accept NULL by default and any comparison of NULL to any other value, including NULL, returns NULL.
The AnsiNulls property affects NULL handling behaviors for the user’s connection only and overrides any database specific settings for column creation and NULL comparison.
Boolean
Read/write
HRESULT GetAnsiNulls(LPBOOL pRetVal);
HRESULT SetAnsiNulls(BOOL NewValue);