Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Update DB2 Table with Duplicate Primary Key



To maintain the integrity of a DB2 table the primary key is always unique in the entire table. For example, if we have a DB2 table ORDERS which stores all the orders and the primary key of the table is column ORDER_ID. Then there can be only a single row having a particular order id. This will be useful to identify an order distinctly.

If we try to insert or update a row in a DB2 table having duplicate primary key using a COBOL-DB2 program, we will get DB2 error code -803. As per the IBM documentation - 803 error code states the following−

“Unique index violation. Try to insert duplicate record (Duplicate Error)”
Updated on: 2020-09-14T10:29:11+05:30

848 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements