1. 删除mysql下某个数据库的所有表,不删除数据库,通过下面的查询语句查询出所有drop table语句,然后把drop table语句拷贝到命令行执行。
[root@localhost ~]# mysql -uroot -p
Enter password:
mysql> select concat(‘DROP TABLE IF EXISTS ‘,table_name,‘;‘) from information_schema.tables where table_schema=‘mydb‘; //mydb数据的是要删除所有表的数据库名称。
原文:http://www.cnblogs.com/xhkj/p/6535561.html