DROP DATABASE
删除数据库。
另请参阅:UNDROP DATABASE
语法
DROP { DATABASE | SCHEMA } [ IF EXISTS ] <database_name>
DROP SCHEMA
是 DROP DATABASE
的同义词。
示例
此示例创建并删除名为 "orders_2024" 的数据库:
root@localhost:8000/default> CREATE DATABASE orders_2024;
CREATE DATABASE orders_2024
0 row written in 0.014 sec. Processed 0 row, 0 B (0 row/s, 0 B/s)
root@localhost:8000/default> DROP DATABASE orders_2024;
DROP DATABASE orders_2024
0 row written in 0.012 sec. Processed 0 row, 0 B (0 row/s, 0 B/s)