DB2 Error Code 2601 – Attempt to insert duplicate key row in object ‘%s’ with unique index ‘%s’

In this post, you’ll learn about the DB2 error 2601-Attempt to insert duplicate key row in object ‘%s’ with unique index ‘%s’ and the reason why you are receiving the error message and how to fix it

How does this Error Message Looks like

2601 – Attempt to insert duplicate key row in object ‘%s’ with unique index ‘%s’

Reason for the Error & Solution

Duplicate values have been inserted into a column that has a UNIQUE constraint. It is the responsibility of the application to deal with prevention of insertion of duplicate values.