Returns the default nullability for the database for this session.
GETANSINULL(['database'])
int
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:
This example checks the default nullability for the pubs database.
USE pubs
GO
SELECT GETANSINULL('pubs')
GO
Here is the result set:
------
1
(1 row(s) affected)