In SQL, we can drop or delete a database either by using the “DROP DATABASE” statement or directly from SQL Server Management Studio. We can delete a database based on our requirements.
Using the “DROP Database” statement, we can drop or delete the SQL database. Generally, our syntax will be as shown below to drop the database in SQL.
Following is the syntax to drop or delete the existing database in SQL using the DROP DATABASE statement.
Here databasename is the name of the database to drop or delete from SQL Server.
Following is the example query to delete or drop the existing database “sqltutorialexamples” in the SQL server.
To drop a database, you must have admin access rights and refresh your database section once you execute the above query to check whether the database was deleted from your list or not.
To delete a database from SQL Server, open SQL Server Management Studio à Select your database in the Databases section à Right-click and select DELETE Option 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 the process is finished, then refresh your databases section and check whether your database was deleted or not in the SQL server.