Nullable columns in a database can sometimes lead to performance issues. That is definitely not to say that nullable columns will always cause performance issues, but if you do happen to have performance issues, identifying nullable columns can potentially provide some clues as to where the issue lies. Sometimes making a column NOT NULL
can help improve performance.
By “nullable columns” I mean, columns that allow for NULL. If the column’s definition doesn’t include NOT NULL
, then it allows for NULL values and it’s “nullable”.
Below is code that allows you to list all nullable columns in a database in SQL Server.