Ssms-Tips-Tricks

SSMS Tips and Tricks 3-7: Replace tabs with spaces and do macro-like work using regular expressions

A request that I hear all the time, is “I don’t like tabs but insert name of annoying colleague here decided he likes to use them. How do I remove them?” Similar thing happens when installing SSMS and leaving the default options.

Tabs vs Spaces

Whether to use tabs or spaces leads to near religious level arguments amongst SQL developers. I see strong arguments on both sides. In the past, I’ve always ended up using spaces because I’ve run into issues with tabs in some of the tooling that I needed to use.

2025-07-10

SSMS Tips and Tricks 3-6: Manually prompting for and refreshing Intellisense

Intellisense is one of the best things that’s ever been added to Visual Studio or to SQL Server Management Studio (SSMS). It’s hard to remember back to before it was added, or how we worked then.

I had a young friend from the United Kingdom who had just completed a Computer Science degree and one of the things that he was most proud of, is that he knew so many HTML tags and which attributes went with which tags. When I showed him HTML Intellisense in Visual Studio, I think he was about to cry.

2025-07-08

SSMS Tips and Tricks 3-5: Fixing or improving the online documentation

I mentioned in an earlier post that I think the online documentation is now superior to any version that you can install locally.

I particularly like the way that the online version is cross-version ie: each page covers all supported versions, instead of having a separate page for each version.

But one of the really big bonuses is that you also have the opportunity to change the documentation if you think it’s incorrect or you think it could be improved. Microsoft have placed all the documentation in a GitHub repository and you can change it. Doing so is easier than you might expect.

2025-07-06

SSMS Tips and Tricks 3-4: The magical F1 key - help on syntax and metadata

Years ago, I used to always recommend that people install Books Online (BOL) on their systems. It’s ironic that it was called “Online”, given we’re really talking about “Offline”, but back when we first were talking about it, we were comparing it to a physical book, not to a live reference on a computer screen.

Nowadays though, I find that the version online is so far superior to the one that you can install locally, that I think it’s better to just use the online version. I particularly like the way that the online books are now cross-version ie: each page covers all supported versions, instead of having a separate page for each version.

2025-07-04

SSMS Tips and Tricks 3-3: Apply cut or copy commands to blank lines when there is no selection

When I’m doing a lot of query editing, I often get a bit mesmerized, particularly if there’s a lot of manual copy and paste or cut and paste going on.

One thing that often drives me crazy is when I use Ctrl-C (ie: copy) when I meant to use Ctrl-V (ie: paste). Invariably, I do this when I have nothing highlighted at all. So not only did I not get the value pasted, I just copied an empty value into the clipboard.

2025-07-02

SSMS Tips and Tricks 3-2: Useful keyboard shortcuts

Visual Studio is a very configurable tool, and particularly in the area of keyboard shortcuts. Because SQL Server Management Studio (SSMS) is based on Visual Studio, it inherits many of these configuration options. SSMS has a very rich set of keyboard shortcuts. Without trying to cover most of them, I do want to highlight a few that I think are really important to know how to use.

Let’s start with an easy set of commands.

2025-06-30

SSMS Tips and Tricks 3-1: Using line numbers and Go To

If you ever have long scripts in SQL Server Management Studio and need to refer to a particular line, it can be helpful to have line numbers shown. This is even more useful if you ever need to write a set of instructions for someone on how to modify a query, or if you are trying to describe how a query works.

Instead of having a query like this:

2025-06-28

SSMS Tips and Tricks 2-13: Using environment color themes

One feature that many developers have been asking the SSMS team for, is the ability to use a dark mode.

Instead of a screen that looks like this:

They wanted a screen that looks like this:

This capability is now present in SSMS. In Tools then Options then Environment then General, you can now choose a Color Theme:

Note that there are several themes now available, including a new extra contrast option.

2025-06-26

SSMS Tips and Tricks 2-12: Using zoom features

When working with SQL Server Management Studio, sometimes you need to show someone else what you’re working on, and the fonts that you’re using are just too small for someone looking over your shoulder or looking at a screen that you’ve shared with them.

What I often see someone do then, is to go into Tools and Options and start to change the font and color settings. The pain with this is that you then need to set them back later.

2025-06-24

SSMS Tips and Tricks 2-11: Use visual glyphs for word wrap

Code quality has always been an important topic ever since coding began. Code complexity is an important part of this. One of the topics that came up many years ago was a discussion on what length procedures or functions should be, before they became too difficult to follow.

I remember one guy commenting that he thought as soon as all the code didn’t fit on your screen any more, you were much more likely to have bugs in it. At the time, screens weren’t all that big.

2025-06-22