If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
DB2 Insert statement with error SQLCODE: -803, SQLSTATE: 23505
I am trying to Java PrepareStatement insert into a table db2 table and get this error:
SQLCODE: -803, SQLSTATE: 23505, SQLERRMC: ITXRTLO0;000000BC18
However, when I ran the insert statement it works fine.
SQL0803N One or more values in the INSERT statement, UPDATE
statement, or foreign key update caused by a DELETE
statement are not valid because the primary key, unique
constraint or unique index identified by
"<index-id>" constrains table "<table-name>" from
having duplicate rows for those columns.
In other words, you tried to insert a value that violated a unique constraint.