环境
MySQL 数据库版本信息:
mysql> status
--------------
mysql Ver 14.14 Distrib 5.7.30, for Linux (x86_64) using EditLine wrapper
Server version: 5.7.30 MySQL Community Server (GPL)
删除一张表
现在,我的数据库中有一个 user
表:
mysql> SHOW TABLES;
+---------------------------+
| Tables_in_hello-account-1 |
+---------------------------+
| user |
+---------------------------+
1 row in set (0.00 sec)
我们可以使用 DROP TABLE tbl_name
语法删除它:
mysql> DROP TABLE user;
Query OK, 0 rows affected (0.00 sec)
删除成功,表没了:
mysql> SHOW TABLES;
Empty set (0.00 sec)