{{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:

Setup AWS Application Load Balancer Https

Setting up HTTPS for an AWS Application Load Balancer (ALB) involves configuring an HTTPS listener, deploying an SSL certificate, and defini...