In sql, we can drop or delete a database either by using “DROP DATABASE” statement or directly from SQL Server Management Studio.
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.
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.
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.
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
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
Once process is finished, then refresh your databases section and check whether your database deleted or not in sql server.