KB4013116 - FIX: ALTER TABLE, ADD CONSTRAINT, and PRIMARY KEY statements do not detect a duplicate key in SQL Server 2016


Assume that you use In-Memory OLTP in Microsoft SQL Server 2016. When you use the ALTER TABLE, ADD CONSTRAINT, or PRIMARY KEY statement to add a primary key for a memory-optimized table, even if the table already contains a primary key, the statement completes successfully. This issue may result in more than one primary (duplicate) key that is created in the same table. Additionally, errors occur when you insert data into the table.


This fix is included in the following cumulative updates for SQL Server:

Each new build for SQL Server 2016 contains all the hotfixes and security fixes that were included in the previous build. We recommend that you install the latest build of SQL Server 2016.


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


Learn about the terminology Microsoft uses to describe software updates.

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.