So here we are one more SSMS Tip, short cut keys. I know this sounds lame and quite possible is, but I’ve watched a lot of my fellow developers and DBAs over the years and while most of them write T-SQL well over 50% of the time vs. using SSMS wizards most of them don’t use short cut keys or at least not affectively. I’m not talking about those run of the mill Ctrl-C/Ctrl-V or Alt Tab standard windows short cut keys but some more SSMS specific short cut keys. I’m talking hard core white screen with black and red and blue and maybe some gray text screaming at you! Hopefully this list will help you get things done a little faster. (Just in case here is the official list.)
Top 10 so you don’t have to take your hands off the keyboard while using SSMS short cut keys list:
- Ctrl-L -Execution Plan. Looking at execution plans is how spend a lot of my day. I like to know the code is going to preform so I use this a lot.
- Ctrl-KC – double dash comments any lines you are highlighting. I really wish Microsoft would change this to slash star comment blocks but they haven’t so we just have to deal. This will however give you multiple sets of double dash comments if you keep hitting it which can be useful if you find yourself commenting out code once and then a larger set again later.
- Ctrl-KU – undo a double dash comment. This will also undo multiple sets of double dash comments if you hit it multiple times. Kind of pairs with number 3.
- Tab – yes thats it, it just tabs your text. Kind of standard and not really a “hot key” but its in my list because I use it a lot. Spoilier altert- it goes with #5
- Shift Tab – Removes a tab from the highlighted text. Very useful so you don’t have to take you hands off the key board.
- F5 – Run that code! Its the same as the little green arrow but once again you don’t have to take your hands off the keyboard to grab that mouse.
- Alt-Break – Stop that code! I know pairs but I like to keep things organized, its the opposite of #6 in that it stops your currently executing code.
- F6 – This tabs you through your RESULTS and MESSAGES window. This is very useful if you have gone into the Tools->Options->Query Results ->Results to… and selected “Display results in separate tab”
- Shift-Alt-Enter – FULL SCREEN SSMS, I can’t say anymore that this is the way I like to write code full open, and its easy to put back. Shift-Alt-Enter…so its more of a toggle.
- Ctrl-Tab – Moves you through multiple query windows.
While some may say thats the lamest article/top ten list ever, and it maybe was, give it shot you may find yourself more productive.
Updated: 4/25/2005 (A few additional Built-In short cut keys)
- Shift-Alt-R – Refreshes IntelliSense
- Ctrl-N – Opens a new query window with the same connection as the current connection window.