The DROP DATABASE
statement is used to delete an existing SQL database.
DROP DATABASE databasename; |
Note: Exercise caution before dropping a database. Deleting a database will lead to the permanent loss of all information stored within it! |
The SQL statement below drops the existing database named ‘testDB’:
DROP DATABASE testDB; |
Tip: Ensure you have administrative privileges before dropping any database. After dropping a database, you can verify its absence from the list of databases using the SQL command: SHOW DATABASES;” |