Michael J. Swart

October 1, 2009

The ABCs of Management Studio Shortcuts

Filed under: Technical Articles — Tags: , , — Michael J. Swart @ 10:39 am

Today I was watching a webcast hosted by Brent Ozar and Tim Ford (congrats on the MVP awards guys). One topic came up was “which key do you press to execute a query in SSMS?.” F5 seemed to be the default key. However I found out that Ctrl+E did the same thing. This prompted me to enumerate the alphabet and to see what each shortcut combination accomplishes.

I’m also giving the shortcuts a rating from 0-5 based on how often I personally use them. 0 means never. 5 means I’d rather give up my spacebar than this shortcut.

BTW, I’m also not mentioning ALT keys, or SHIFT keys, that comes later. But first “CTRL, CTRL you must learn CTRL!”

Ctrl+A: Select all text (a standard text editor command) : 4
Ctrl+C: Copy (a standard text editor command) : 5
Ctrl+D: Show results in grid : 4
Ctrl+E: Execute (aka F5, aka Alt+X) : 0 but maybe that will improve now that I know about it.
Ctrl+F: Quick Find: 3
Ctrl+G: Goto line number: 0 I don’t use it, but then I don’t have line numbers turned on.
Ctrl+H: Quick Replace: 2
Ctrl+I: The best hidden treasure ever. Hit Ctrl+I and then type some text, you go straight to the next occurence of that string. Try it now, I’ll wait… Wasn’t that so cool? : 5
Ctrl+J: Intellisense’s list members (2008 only) : 3
Ctrl+K: First key of a two key shortcut that can help do lots of things. This is a doorway into cool stuff. : 3
Ctrl+L: Show execution plan. : 2
Ctrl+M: Include Actual Execution Plan : 2
Ctrl+N: New Query window with the same connection as the current one. : 2
Ctrl+O: Open file (pretty standard) : 3
Ctrl+P: Print (Still there for nostalgia purposes) : 0
Ctrl+R: Hide Results Pane : 4 A big help for screen real estate.
Ctrl+S: Save File : 3
Ctrl+T: Show results as text : 3
Ctrl+U: Puts focus on the choose database control (Mnemonic: U is for USE) : 4
Ctrl+V: Paste (a standard text editor command) : 5
Ctrl+X: Cut (a standard text editor command) : 4
Ctrl+Y: Redo (a standard text editor command) : 4
Ctrl+Z: Undo (a standard text editor command) : 4

So there you go, Seemingly still up for grabs is Ctrl+Q and Ctrl+B. These don’t appear to do anything.

8 Comments »

  1. Turns out if I had been following Aaron Alton's blog earlier I would have known about Ctrl+I already:
    http://thehobt.blogspot.com/2009/01/lesser-known-features-of-sql-server_08.html

    Comment by Michael J. Swart — October 1, 2009 @ 11:06 am

  2. CTRL+I… Thanks… Love it! (Yes, it was cool).

    Comment by Brad Schulz — October 1, 2009 @ 2:22 pm

  3. Nice job on the Control+I – I didn't know that either!

    Comment by Brent Ozar — October 1, 2009 @ 3:29 pm

  4. Great tips. CTRL+I rules. I like the hotkey for commenting/uncommenting.

    (select text first)
    CTRL+SHIFT+C = comment
    CTRL+SHIFT+R = uncomment

    You have to have change the keyboard scheme to SQL Server 2000 first, which I believe the hotkeys you've just mentioned will still work.

    Tools -> Options -> Keyboard -> Keyboard Scheme: SQL Server 2000

    Comment by Dan — October 2, 2009 @ 10:50 am

  5. Hey Dan! Thanks for stopping by. For commenting and uncommenting I've gotten used to CTRL+KC and CTRL+KU.

    Comment by Michael J. Swart — October 2, 2009 @ 11:22 am

  6. Thanks, Michael! I didn't know about some of those. I've printed it out so I remember to use them more. 🙂

    Comment by Michelle Ufford — October 9, 2009 @ 1:01 pm

  7. Thanks for the comments you guys. I could write a whole other article on Ctrl+Shift or Ctrl+K, but I'm going to leave that as an exercise for the reader 🙂

    Comment by Michael J. Swart — October 10, 2009 @ 6:06 pm

  8. One more…
    For maximum use of screen real estate, combine CTRL+R with SHIFT+ALT+ENTER

    Comment by Michael J. Swart — October 20, 2009 @ 9:27 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress