MySQL Database

MySQL DROP DB

The MySQL DROP DATABASE Statement

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

Syntax

				
					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!

DROP DATABASE Example

The following SQL statement drops the existing database “testDB”:

Example

				
					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;

Share this Doc

MySQL DROP DB

Or copy link

Explore Topic