loading

SQL Drop DB

The SQL DROP DATABASE Statement

An existing SQL database can be dropped using the DROP DATABASE statement.

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 current database “testDB” is dropped with the SQL query that follows:

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: Display databases;

Share this Doc

SQL Drop DB

Or copy link

Explore Topic