SQL SERVER – How to DELETE Multiple Table Together Via SQL Server Management Studio (SSMS)?

Question: How to DELETE Multiple Table Together Via SQL Server Management Studio (SSMS)?

Answer: I just received this question the other day during Comprehensive Database Performance Health Check. My initial answer was that you can easily script it out like following:

DROP TABLE [dbo].[InMemory_Columnstore_People]
GO
DROP TABLE [dbo].[InMemory_People]
GO

However, the DBA asked me the question once again saying, he is quite familiar with the T-SQL script but he would love to know if there is a shortcut to do that via SSMS. Essentially he would love to drop multiple tables via keyboard in SQL Server Management Studio.

Fortunately, it is totally possible to do so. Here are the steps:

First, go to SSMS and select the menu View and there select the option “Object Explorer Details”. Alternatively, you can also hit keyboard option F7 and it will open up Object Explorer Details.

SQL SERVER - How to DELETE Multiple Table Together Via SQL Server Management Studio (SSMS)? ssmsdelete1

In Object Explorer Details, select the tables which you want to delete and either hit the keyboard button DELETE or just go right click on the tables and select the option DELETE.

SQL SERVER - How to DELETE Multiple Table Together Via SQL Server Management Studio (SSMS)? ssmsdelete2

Well, I personally prefer to delete the scripts with the help of T-SQL but if you are one of those people who love to drop objects via SSMS, you can follow the guidance from this blog post.

Reference: Pinal Dave (https://blog.sqlauthority.com)

, , ,
Previous Post
SQL SERVER – Script to Identify Memory Used By Each Database
Next Post
SQL SERVER – Adding Values WITH OVER and PARTITION BY

Related Posts

2 Comments. Leave new

Leave a Reply

Menu