How to Handle Multiple Objects by using Object Explorer Detail Windows in SSMS - SQL Server / TSQL Tutorial Part 22

Scenario:

I know that I can right click on table and generate script or Delete the table, If I want to do the same operation of multiple tables, How I can do that? I don't want to perform this operation one by one on each table.

Solution:

SQL Server Management Studio(SSMS) Object Explorer windows is really useful when you want to perform same operation such as generate create script, Delete objects etc. on multiple objects. 

Step 1:
Go to View drop down and then choose Object Explorer as shown below. You can also use F7 shortcut key to start Object Explorer Details windows.

How to Script Multiple Object in SSMS - SQL Server Tutorial 


Step 2:
Object Explorer Detail window will open, Now you can go to objects which you like. you can Click on Different Databases in Object Manager to choose details in Object Explorer detail windows related to that database.

Let's say if i would like to script multiple tables from TestDB1, I can click on TestDB1 and then open Tables and then by pressing Shift Key , I can select multiple tables and then right click and generate scripts.


How to Delete Multiple objects by using Object Explorer Detail window in SSMS- SQL Server


No comments:

Post a Comment