当前位置:首页 > 数据库 > 正文

mysql批量修改表前缀

2020-03-01 数据库

SQL语句:

SELECT CONCAT( ‘ALTER TABLE ‘, table_name, ‘ RENAME TO db_‘, substring(table_name, 4), ‘;‘ ) FROM information_schema. TABLES WHERE table_name LIKE ‘ct%‘;

温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/SQL/21557.html