0

I am trying to update a table with the following query:

alter table main_iteminstance add offer_last_updated DATETIME default null

Error Code: 1062 Duplicate entry 'https://itunes.apple.com/fr/movie/id1000108161' for key >'store_url'

Execution Time : 0 sec Transfer Time : 0 sec Total Time : 40 min 24 sec

The odd thing is that there is no duplicate here. I checked the database and there's only one entry for that, so the error seems out of place. Has anyone ever run into something similar?

Philipp Kief
  • 8,172
  • 5
  • 33
  • 43
  • It should be related to the primary key – Deepu Sasidharan Feb 08 '19 at 04:24
  • You might find some of these answers useful: https://stackoverflow.com/questions/22580529/mysql-duplicate-entry-error-when-trying-to-add-new-column – EdmCoff Feb 08 '19 at 04:28
  • @EdmCoff "try again" seems like to suggested solution here. Thanks for sharing. –  Feb 08 '19 at 04:36
  • I thought cutd's explanation made sense and Anton Larchenkov's answer might help. Although if this is a one-off, then I guess most people seem to have success with "try again." – EdmCoff Feb 08 '19 at 15:54
  • @EdmCoff agreed -- for us, it actually worked (with zero changes) the second time we tried it. –  Feb 08 '19 at 18:52

0 Answers0