Deleting SQL database refers to the process of deleting/removing the entire database permanently from the database server and it can not be undone. "DROP DATABASE" command is used to remove the database.
You will not be able to retrieve the date unless you have a backup. Be careful before you delete a database, please make sure you have perform a backup of the important data.
As you can see in below image, [BI Tutorial] database is present. Let's delete it!
1. Run below SQL command in SSMS :
USE [master]; DROP DATABASE [BI Tutorial];
2. Above command will delete [BI Tutorial] from SQL Server database instance.
That's it! You have successfully deleted [BI Tutorial] database using T-SQL.
1. Right-click on the database you want to delete in "Database folder" >> Select "Delete".
2. "Delete Object" dialog box will appear, review the database name >> Select the checkbox "Close existing connections", this will close active connections before deleting the database >> Click "OK" button.
3. There you go, [BI Tutorial] database deleted successfully.
That's it! You have successfully deleted [BI Tutorial] database using GUI.
Use the "DROP DATABASE" command in SQL to delete a SQL database.
The command used to delete a database in SQL varies depending on the database management system, but for SQL Server, it's typically "DROP DATABASE [database_name];" and for MySQL, it's "DROP DATABASE [database_name];"
The command "DROP DATABASE" is used to delete a database in SQL.
The SQL query for deleting data is "DELETE FROM <table_name> WHERE <condition>;" for deleting records or "DROP DATABASE <database_name>;" for deleting an entire database.