mysql批量修改表前缀
warning:
这篇文章距离上次修改已过593天,其中的内容可能已经有所变动。
修改表名
SELECT
CONCAT(
'ALTER TABLE ',
table_name,
' RENAME TO b_',
substring( table_name, 2 ),
';'
)
FROM
information_schema.TABLES
WHERE
table_name LIKE 'a_%';