Timeline for How to use ON DUPLICATE KEY for UPDATE
Current License: CC BY-SA 3.0
2 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 27, 2012 at 16:40 | comment | added | Googlebot | I really like your way of answering and I deeply appreciate it. However, this is the first method came into my mind. The problem is that UPDATE KEY is not recursive. In you last INSERT if you already have number 16, it will not change 15 to 17 (next available value). It will only try 16, and will fail due to duplicate key. | |
Mar 26, 2012 at 17:54 | history | answered | RolandoMySQLDBA | CC BY-SA 3.0 |