Nullability Resolution

In the ODBC grammar, columns for which nullability is not specified are assumed to be nullable. In the SQL Server grammar, columns for which nullability is not specified are assumed to be not nullable.

When connected to SQL Server 6.x, the SQL Server driver resolves this situation by setting SET ANSI_NULL_DEFAULT_ON. This causes the server to use a default of NULL for columns where nullability is not specified except for bit columns or user-defined datatypes.

When connected to SQL Server 4.2x, the SQL Server driver adds a NULL specification to each column definition in a CREATE TABLE statement that does not specify whether the column is nullable (except for bit columns, which are not nullable). It adds a NULL specification to each column definition in an ALTER TABLE statement (except for bit columns, which are not nullable).