版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/toume/article/details/80360333
mysql> select CONCAT('truncate TABLE ',table_schema,'.',TABLE_NAME, ';') from INFORMATION_SCHEMA.TABLES where table_schema in ('dd');
mysql> truncate TABLE dd.zyx_admin;
truncate TABLE dd.zyx_admin_issued;
truncate TABLE dd.zyx_band;
truncate TABLE dd.zyx_baodansq;
truncate TABLE dd.zyx_baodanzx;
truncate TABLE dd.zyx_buy_stocks;
数据库(dd)中表就被清空了