Shortcut: Using the Clipboard Ring in SSMS

Shortcut: Using the Clipboard Ring in SSMS

Two key combinations used by SQL Server T-SQL developers every day are Ctrl-C and Ctrl-V for copy and paste.

But many users of SQL Server Management Studio (SSMS) don’t realize that it has a clipboard ring and can deal with several objects in the clipboard at the same time.

Let’s see an example.

In this screen shot, I’ve opened a query window with the source code of the AnalyzeTableColumns procedure from SDU Tools.

I might want to work with the parameters for that procedure, so I double-click and hit Ctrl-C for each of the parameter names.

I’ve then opened a new query window where I want to work. If I hit Ctrl-V, I just get the last value that I copied, as expected:

However, instead of using Ctrl-V, if I use Ctrl-Shift-V, I see the same value, but if I continue to hit Ctrl-Shift-V, I see the previous clipboard entries, one at a time. I can then use one or more of the other parameter values that I copied before:

This is one of those things that once you get used to it, you’ll wonder how you ever worked without it.

2018-01-18