Duplicate Entry for Key on Query When Using INSERT ... ON DUPLICATE KEY UPDATE ...
Last updated on NOVEMBER 23, 2014
Applies to:MySQL Server - Version: 4.0
MySQL Server - Version: 4.0 and later [Release: 4.0 and later]
Information in this document applies to any platform.
the following error can occur on the slave.
Error 'Duplicate entry 'X' for key 'Y' on query. Default database: 'updatetest'. Query: 'INSERT INTO table1 SET col2 = N, col3 = N ON DUPLICATE KEY UPDATE col2 = VALUES(col2), col3 = VALUES(col3)'
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms