Delete Database in SQL Server

In sql, we can drop or delete a database either by using “DROP DATABASE” statement or directly from SQL Server Management Studio we can delete a database based on our requirements.

SQL Drop Database Statement

By using “DROP Database” statement we can drop or delete SQL database. Generally to drop database in SQL our syntax will be like as shown below.

SQL Drop Database Syntax

Following is the syntax to drop or delete existing database in sql using DROP DATABASE statement..

 

DROP DATABASE databasename

 Here databasename is the name of database to drop or delete from SQL Server.

SQL Drop Database Example

Following is the example query to delete or drop existing database “sqltutorialexamples” in sql server.

 

DROP DATABASE sqltutorialexamples

To drop a database you must have an admin access rights and refresh your database section once you execute above query to check whether the database deleted from your list or not.

SQL Drop Database using SQL Server Management Studio

To delete a database from SQL Server, open SQL Server Management Studio à Select your database in Databases section à Right click and select DELETE Option like as shown below

 

Drop or Delete Database in SQL Server using Management Studio

 

Whenever we click on Delete Option, a new Delete Modal object window will open in that click on OK to drop or delete a database in sql server like as shown below 

 

Delete Database in SQL Server using Management Studio

 

 Once process is finished, then refresh your databases section and check whether your database deleted or not in sql server.

Topics Covered