Skip to main content

DROP DATABASE

Drops a database.

See also: UNDROP DATABASE

Syntax

DROP { DATABASE | SCHEMA } [ IF EXISTS ] <database_name>

DROP SCHEMA is a synonym for DROP DATABASE.

Examples

This example creates and then drops a database named "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)
Did this page help you?
Yes
No
Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today