mysql - Rename and add prefix to all tables with phpMyAdmin -


i want add prefix , rename tables in database phpmyadmin.

i’ve tried these 2 scripts :

1)

select concat('rename table', table_name, ' ', 'prefix_',table_name,';') information_schema.tables table_schema='db_name'; 

2)

select concat('alter table ', table_name, ' rename osc_', table_name, ';') information_schema.tables table_schema='db_name'; 

phpmyadmin says script ok (see screen shot) nothing change. missing phpmyadmin ?

enter image description here

finally, found easy way :

1) select tables want add prefix

2) choose in select option : replace prefix table

3) fill field prefix.

see screenshot :

enter image description here

enter image description here


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -