The DROP DATABASE statement is utilized to remove an existing SQL database.
| DROP DATABASE databasename; |
| Caution: Exercise care prior to dropping a database, as doing so will result in the complete loss of all information stored within the database! |
The following SQL statement deletes the current database named “testDB”:
| DROP DATABASE testDB; |
| Tip: Ensure you have administrative privileges before dropping any database. Following the dropping of a database, you can verify its absence in the list of databases using the SQL command: SHOW DATABASES; |