Ssms-Tips-Tricks

SSMS Tips and Tricks 1-3: Script multiple objects at once

If you want to script all the indexes on a table (or all the tables, all the stored procedures, etc, etc.), you can do that the long way by using the Generate Scripts right-click option for a database, but there’s a better way.

Let’s use the Purchasing.PurchaseOrderLines table from WideWorldImporters as an example. Here are the indexes on it:

image

The scripting options are well-known. You right-click the object, and can navigate to the scripting option:

2025-05-11

SSMS Tips and Tricks 1-2: Controlling quoting when dragging columns

Previously I showed how useful it is to be able to drag columns from either a table or from user-defined table type onto a query window.

But one of the first comments I hear from people who did that is:

I hate all those square brackets. How do I stop that?

The option to do that was added to Tools> Options > SQL Server Object Explorer > Commands:

Bonus points for the team because they also provided us with an option to decide whether schema names are dragged as well. That’s mostly used for tables but also applies to other schema-bound objects like stored procedures.

2025-05-09

SSMS Tips and Tricks 1-1: Dragging all column names from Object Explorer

This is a popular shortcut in SQL Server Management Studio (SSMS) but I continue to be amazed how many people aren’t aware of it.

Object Explorer is a very useful part of SSMS and you can drag pretty much any name that you see in it across to a query window.

You could do the same for each column in the Columns list.

You might also realize that you can hover over the asterisk and see a list of columns:

2025-05-07

SSMS Tips and Tricks: Overview

Now that I’ve finished posting my T-SQL 101 series, it’s time to start another blog post series.

A few years back, I created a shortcuts series that covered how to use SQL Server Management Studio (SSMS) proficiently. I eventually added that all into a free eBook. It was updated in March 2019.

You can get a copy of it here:

SQL Server Management Studio Tips and Tricks

SSMS version 21 is a huge shift from previous versions, so I thought it was time to revisit all the tips and tricks, to work out what still does or doesn’t work, and to add a bunch of new ones. V21 is based on the 64 bit version of Visual Studio, not the older 32 bit VS partner edition shell.

2025-05-05