Came across a problem where an insert query was failing to write to a table with error - Duplicate primary key. Interesting part was that the table did not have a primay key. After spending some time it was noticed that there were two trigger configured for the table. One for insert and other for update. The insert trigger writes the same record in some other table which had the primary key constrain which was failing if the same insert query is executed twice.
No comments:
Post a Comment