FIX: Error when you add a NOT NULL column with default values to a non-empty clustered columnstore index in SQL Server 2016 Standard and Express edition

Applies to: SQL Server 2016 DeveloperSQL Server 2016 EnterpriseSQL Server 2016 Enterprise Core


Assume that you have installed Service Pack 1 (SP1) for the Standard or Express edition of Microsoft SQL Server 2016. When you try to add a NOT NULL column that has default values to a non-empty clustered columnstore index, for example, by using the ALTER TABLE … ADD COLUMN … NOT NULL … DEFAULT … statement, an error message that resembles the following is displayed.

Msg 515, Level 16, State 4

Cannot insert the value NULL into column '<column name>', table '<table name>'; column does not allow nulls. The alter table to add column statement fails.

Note This issue does not occur in the Enterprise edition of SQL Server 2016.


This issue is fixed in the following cumulative update for SQL Server:

       Cumulative Update 2 for SQL Server 2016 SP1


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.


Learn about the terminology that Microsoft uses to describe software updates.