删除数据库

MySQL从小白到总裁完整教程目录:https://blog.csdn.net/weixin_67859959/article/details/129334507?spm=1001.2014.3001.5502

语法格式:

drop database 数据库名称;

这个命令谨慎使用,俗话说:删库跑路!

案列:删除testing数据库,并验证

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| bd_ecshop          |
| czwbkl             |
| mysql              |
| performance_schema |
| test               |
| testing            |
+--------------------+
7 rows in set (0.02 sec)

mysql> drop database testing;
Query OK, 0 rows affected (0.09 sec)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| bd_ecshop          |
| czwbkl             |
| mysql              |
| performance_schema |
| test               |
+--------------------+
6 rows in set (0.00 sec)

删除数据库_第1张图片

你可能感兴趣的:(数据库)