Measure NULL storage in ordinary rows, compare fixed and variable columns, inspect record size, and test sparse and compressed designs.
Skipping No-Op Updates: Changing Only Rows That Really Differ
Skip no-op updates with NULL-safe EXCEPT or IS DISTINCT FROM, inspect affected counts, and avoid unnecessary rowversion and trigger changes.
Nullable Columns in a Database: List Them and Count NULLs
Nullable columns in a database cost you ISNULL calls and OR IS NULL conditions in every query. This post lists them with a catalog query, compares the INFORMATION_SCHEMA version, and counts the real NULLs in each column. The count tells you which columns can become NOT NULL and which can go.
Profiling a Table’s Data: Nulls, Distinct Values and Lengths
Start profiling a table’s data with null counts, distinct values, lengths, and generated checks that expose misleading column definitions.
Change Column From NULL to NOT NULL in SQL Server
To change a column from NULL to NOT NULL, first fill every NULL value, then run ALTER COLUMN with the full data type and NOT NULL. This post shows the Msg 515 error you get otherwise, how to choose the replacement value, and the trap that makes a column nullable again. It ends with a default constraint that keeps new rows valid.
SQL SERVER – Puzzle – Brain Teaser – Changing Data Type is Changing the Default Value
Changing the Default Value is the question behind this data-type puzzle. I keep the expression, data type and nullability separate.







