Altering Column nullability to NOT NULL requires resolving existing NULLs under an approved data rule. A customer used empty strings.
Rowstore to Columnstore: Replace the Clustered Index
Rowstore to columnstore is a change of the clustered index, and one command works in only one case. This post builds two tables of 600,000 rows, shows the error from DROP_EXISTING on a primary key, and converts each table the working way. It compares the sizes before and after.
Maximum Columns in an Index: 32 Keys and the Way Around
The maximum columns in an index is 32 key columns, and a second limit on key size can stop an index earlier. This post builds a 40 column table, shows the error for a 33rd key column, and adds included columns to get around it. It also shows the 900 and 1,700 byte key limits and tests statistics on 33 and 40 columns.
COUNT(*), COUNT(column) and COUNT(DISTINCT): Basics That Trip People
Why do two counts of the same table disagree? Five tiny demos show NULL, blank text, LEFT JOIN placeholders, bigint and join multiplication.
SQL SERVER – Get Column Names
I Get Column names using a schema-qualified table and a defined column order. The four methods use corrected filters.
DEFAULT WITH VALUES: Fill Existing Rows on a New Column
DEFAULT WITH VALUES fills the rows that already exist when you add a column with a default. Without it, a nullable column keeps NULL in every old row. This post shows the three cases side by side, what a default never does, why the constraint needs a name, and how a large table takes the change in a millisecond.
Find All Columns With a Specific Name in SQL Server
To find all columns with a specific name, query sys.columns and join sys.types for the data type. This post lists the matches with their schema, leaves out system objects, and then uses the same catalog to find names that appear with different data types.







