DROP DATABASE is used to delete a database from our Database Management System.
DROP DATABASE my_database;
Here, the SQL command will delete a database named my_database.
Also, you need admin or DROP permission to run this command.
DROP DATABASE Syntax
The syntax of the SQL
DROP DATABASE statement is:
DROP DATABASE database_name;
database_name is the name of the database to be removed.
Note: When we delete a database, all tables and records within a database are also deleted.
List All Databases
To verify the drop query, we can run the following command to list the available databases.
Here, the SQL command lists all the available databases in the DBMS.