Error 2601

Severity Level 14

Message Text

Attempt to insert duplicate key row in object '%.*x' with unique index '%.*s'

Explanation

This error occurs when you attempt to put duplicate index values into a column or columns that have a unique index. SQL Server does not allow two rows to have the same index value (including NULL) in columns that have a unique index. SQL Server checks for duplicate values when the index is created and each time the table is modified using the insert or update statement.

Action

If you need duplicate index values in the indexed column(s), drop the unique index and create a nonunique index.

To use a unique index on data that contains duplicate values, you must change some values to prevent the duplication. You can change the data already in the table by using the select or update statement, or you can change the data to be inserted.

For more information about indexes, see the CREATE INDEX statement in the Microsoft SQL Server Transact-SQL Reference.