For the complete documentation index, see llms.txt. This page is also available as Markdown.

DROP DATABASE

Syntax

DROP DATABASE database_name;

Description

Drops an existing database. Only the database owner can execute this.

Note You cannot drop a database if it contains any non-empty schemas.

If your current database is dropped, you must set a new database for the ongoing sessions. See USE.

Arguments

database_name

The name of the database to drop. If the name is case-sensitive, you must wrap it in double quotes; otherwise, the system uses the lower case name.

Examples

Drop a database

The following shows how to drop the database named DemoDB:

Last updated