SQL DROP DATABASE

SQL DROP DATABASE

The DROP DATABASE statement is used to permanently delete an existing SQL database.

Warning: Be extremely careful with this command! Deleting a database will result in the loss of all data stored within it. This action is irreversible. Always make a backup before dropping a database.


Syntax

The syntax is simple:

DROP DATABASE database_name;

Example

The following SQL statement deletes the database named "TestDB":

DROP DATABASE TestDB;