(41) 9225-6319
contato@felipemarques.com.br
query-rename-all-tables-mysql
02
mar

Query for change all prefix tables in a Prestashop Database

The query is below

SELECT CONCAT(  'RENAME TABLE ', table_name,  ' TO ',  'ps2_', REPLACE( table_name,  'ps__',  '' ) ,  ';' ) AS query
FROM information_schema.tables
WHERE table_schema =  'pedradosol_new'
LIMIT 1000

The result image:

query-rename-all-tables-mysql

query-rename-all-tables-mysql

Facebook Auto Publish Powered By : XYZScripts.com