mysql批量drop table
2021-12-07SELECT concat('DROP TABLE IF EXISTS ', table_name, ';') FROM information_schema.tables WHERE table_schema = 'dbdb';
mysql -u root -e"SELECT concat('DROP TABLE IF EXISTS', table_name, ';') FROM information_schema.TABLES WHERE TABLE_SCHEMA= 'zabbixdb' "|tail -n +2;
分类:数据库 | 标签: |