![]() |
MySQL中批量删除指定前缀表的sql语句
有时候我们在安装一些cms的时候,这些cms都是带表前缀的方便区分数据,但有时候我们测试完需要删除的时候又有别的前缀表就可以参考下面的方法
Code:
Select CONCAT( 'drop table ', table_name, ';' ) 另外一个就是批量修改表名: Code:
Select CONCAT( 'ALTER TABLE ', table_name, 'RENAME TO ', table_name,';' ) Code:
ALTER TABLE de_aaa RENAME TO de_aaa; |
| All times are GMT +8. The time now is 10:38 PM. |
Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.