MySQL Database
The DROP DATABASE statement is used to drop an existing SQL database.
DROP DATABASE databasename;
Note: Exercise caution when deleting a database. The entirety of the data contained in a database will be lost if it is deleted!
The following SQL statement drops the existing database “testDB”:
DROP DATABASE testDB;
Tip: Before deleting any databases, confirm that you have administrator privileges. The following SQL statement can be used to check a dropped database in the list of databases: SHOW DATABASES;
CodingAsk.com is designed for learning and practice. Examples may be made simpler to aid understanding. Tutorials, references, and examples are regularly checked for mistakes, but we cannot guarantee complete accuracy. By using CodingAsk.com, you agree to our terms of use, cookie, and privacy policy.
Copyright 2010-2024 by Refsnes Data. All Rights Reserved.