- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to update DB2 table with a 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)”
Advertisements