Hi guys
Sure this must be simple, just not sure how to do it.
When replicating a row, how can I set the ON DUPLICATE KEY clause to update the PK with the next auto_increment id? I tried
...but it didn't like it.Code:insert into table select * from users where id = 1 on duplicate key update (select max(id)+1 from table)
Thanks in advance


Reply With Quote
Bookmarks