Delete Database in MS SQL Server Last Updated : 02 Sep, 2020 Comments Improve Suggest changes Like Article Like Report Prerequisite – Introduction of MS SQL Server and Create Database in MS SQL Server System databases can't be deleted, only user databases could be deleted. Data and log files will automatically be deleted from disk with database deletion. To delete a database, the below methods could be used – SQL Server Management Studio. Transact-SQL. These are explained as following below. 1. Using SQL Server Management Studio : To delete a database, connect to an instance of the SQL Server, and then expand that instance. Expand Databases, select the database which need to be deleted. Right-click the database which need to be deleted, and then click Delete. Check delete backup and restore history or close existing connections if required and then click OK. 2. Using Transact-SQL : To execute DROP DATABASE statement a user must have CONTROL permission on the database. To delete a database : USE master ; GO DROP DATABASE Databasename; GO To delete multiple databases : USE master ; GO DROP DATABASE database1, database2, ...; GO Example : Let us assume we have created a database "Geekstest" which is no longer required, to delete database : USE master ; GO DROP DATABASE Geekstest; GO Comment More infoAdvertise with us Next Article Delete Database in MS SQL Server K khushboogoyal499 Follow Improve Article Tags : SQL DBMS-SQL SQL-Server Similar Reads Delete Action in MS SQL Server Prerequisite - Foreign key in MS SQL Server A column can be inserted in a child table only if it is a part of the parent table in case of a foreign key. The foreign key allows us to perform other actions called Referential Actions. Referential actions allow to update or delete a row in case of the p 2 min read Create Database in MS SQL Server Databases in Microsoft SQL Server are crucial for managing data, categorized into system databases, which are auto-created and user databases, created by users. In this article, We will learn about the basics of system and user databases along with methods for creating and managing them using T-SQL 5 min read List All Databases in SQL Server In SQL Server, databases are crucial for storing and managing data efficiently. Whether we are managing a large enterprise system or a small application, understanding how to list all the databases on our SQL Server is essential. In this article, we will write SQL queries that help us to retrieve al 3 min read DELETE Statement in MS SQL Server The DELETE statement in MS SQL Server deletes specified records from the table. SyntaxMS SQL Server DELETE statement syntax is: DELETE FROM table_name WHERE condition; Note: Always use the DELETE statement with WHERE clause. The WHERE clause specifies which record(s) need to be deleted. If you exclu 1 min read How to Get Database Size in SQL SQL database size is important for effective management. It indicates the storage space occupied by tables, indexes, and other components. Knowing the size of a database is useful for various purposes, such as monitoring the growth, estimating the backup time, planning the storage capacity, and opti 7 min read SQL Select Database The USE DATABASE statement is a command in certain SQL-based database management systems that allows users to select and set a specific database as the default for the current session. By selecting a database, subsequent queries are executed within the context of that database, making it easier to i 4 min read How to Import and Export SQL Server Database? Creating and managing a SQL Server database is an essential skill for database administrators and developers. In this article, We will go through the process of setting up a database in SQL Server, from creating the database and tables to inserting records, and finally, exporting and importing the d 3 min read Introduction of MS SQL Server Data is a collection of facts and figures and we have humungous data available to the users via the internet and other sources. To manipulate the data, Structured Query Language (SQL) in short has been introduced years ago. There are different versions of SQL available in the market provided by diff 2 min read SQL DROP DATABASE The SQL DROP DATABASE statement is an important command used to permanently delete a database from the Database Management System (DBMS). When executed, this command removes the database and all its associated objects, including tables, views, stored procedures, and other entities.In this article, w 4 min read SQL - Show Databases In the dynamic scene of database management, having a good insight into the available databases for effective administration and development tasks. SHOW DATABASES command is designed to present all databases located on the server. The purpose of exploring the SQL SHOW DATABASES command is to give da 3 min read Like