SQL DROP DATABASE Statement

 

SQL DROP DATABASE Statement :-

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

Syntax

DROP DATABASE databasename;

DROP DATABASE Example

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

Example

DROP DATABASE testDB;

Once a database is dropped, you can check it in the list of databases with the following SQL command:

select * from sys.databases

You can’t see testDB in the list of databases because it has been dropped or removed.

Leave a Reply

Your email address will not be published. Required fields are marked *


CAPTCHA Image
Reload Image