常用的MySQL命令

1:删除表

SELECT CONCAT('drop table ',table_name,';') FROM information_schema.`TABLES` WHERE table_schema='test';

2:清除表

SELECT CONCAT('truncate ',table_name,';') FROM information_schema.`TABLES` WHERE table_schema='test';  

猜你喜欢

转载自www.cnblogs.com/qiaoli0726/p/10263688.html