Curriculum
Course: MYSQL
Login

Curriculum

MYSQL

MySQL References

0/140
Text lesson

MySQL DROP DB

The MySQL DROP DATABASE Statement

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

Syntax

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!

DROP DATABASE Example

The SQL statement below drops the existing database named ‘testDB’:

Example

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;”