GETANSINULL function returns the default nullability for the database for this session.
When the nullability of the given database allows null values and the column or data type nullability is not explicitly defined, GETANSINULL returns 1. This is the ANSI NULL default.
To activate the ANSI NULL default behavior, one of these conditions must be set:
- sp_dboption 'database_name', 'ANSI null default', true
- SET ANSI_NULL_DFLT_ON ON
- SET ANSI_NULL_DFLT_OFF OFF