php - Update/Change all ID in PhpMyAdmin (MySQL) -


i've got problem joomla migration (kunena forum component) when try copy old forum table new one, receive "duplicate error" message.

a simple solution must change values in id column.

the table now:

id |   name  1  | foo  2  | bar 

etc...

can add numbers "20" every rows? result be:

id  |   name  201 | foo  202 | bar 

etc...

thanks!

update `table` set `id` = concat('20', `id`); 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -