so I run
UPDATE x
SET y = y + 1;
where y is a primary key for the table…but then suppose there are two entries in the table with y = 1,2,3…the query will complain about duplicate entry for key ‘PRIMARY’ since when it tries to update the one with y = 1 to y = 2, it’ll conflict with the other already existing entry with y = 2…is there a way to make mysql ignore this and just update everything anyway without manually removing the key….I know that I can just remove key temporarily and then execute this then re-add the key but I’m wondering if it’s possibly to do this without doing so…
You can try this