Mysql 批量刪除表名
select concat('drop table ', TABLE_NAME, ';') from information_schema.`tables` where TABLE_NAME like '%_copy1';
MYSQL批量修改表前綴與表名sql語句
SELECT
CONCAT(
'ALTER TABLE ',
table_name,
' RENAME TO ',
substring_index(table_name, '_copy1', 1),
';'
)
FROM
information_schema. TABLES
WHERE
table_name LIKE '%_copy1';