Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

SQL DROP DB

 

The SQL DROP DATABASE Statement

The DROP DATABASE statement is utilized to remove an existing SQL database.

Syntax

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!

 

DROP DATABASE Example

The following SQL statement deletes the current database named “testDB”:

Example

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;