输入banner图图片脚本导航/分类

mysql 总结

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数据的是要删除所有表的数据库名称。

mysql 总结

标签:for   where   删除   localhost   from   命令行   拷贝   rom   名称