{{theTime}}

Search This Blog

Total Pageviews

java.sql.SQLException: Violation of PRIMARY KEY constraint 'DEPARTMENT_PK'. Cannot insert duplicate key in object 'dbo.DEPARTMENT_TABLE'. The duplicate key value is (100193).

This exception will be thrown when same Department record is inserting into the table DEPARTMENT_TABLE.

Quick Fix1: (Pseudo code)
                 Try {
                             Update department_table
                 }catch(java.sql.SQLException) {
                        Insert into department_table
                 }

No comments:

Java Sequenced Collection Java Sequenced Collection The Sequenced Collection feature was introduced in Jav...