Wednesday, August 5, 2009

SQL Server Management Studio Hotkeys ShortcutKeys Most Used

Hey Now,

This is the list of SQL Server Management Studio Hotkeys / Shortcut keys which are most useful in my opinion. Often there are hotkey lists that has so many, here we have a list of the top O(n) to increase our productivity.

The SQL Saturday #16 is in South FLA is this weekend & I'm out of town so won't be attending. The event triggered me to write this post which is an attempt place some quality SSMS content public.

SSMS Hotkeys Top O(n)
1. F8 Object Explorer - We are always searching servers, tables & sp's

2. T-SQL in Query Window - We are always executing & checking syntax in a Query window.
a F5 Execute
b Cntl + F5 parse to check syntax

3. Tab Navigation - I'm a tabbed browserer
a Ctrl+Tab Tab Switcher
b Alt+F, C Close Tab
c Ctrl+Shift+Tab reverse Tab Switcher

4. Using Stored Procedures - When a stored proc is highlighted in Object explorer
a Right Click, Y Modify SP from object explorer (right click button between right alt & right Ctrl)
b Right Click, E Execute SP from object explorer

5. Ctrl + N Open new Query Window - nuff said

6. -- Comments -- How to comment / uncomment quickly
a Cntl + K, Cntl + C - Comment highlighted rows
b Cntl + K, Cntl + U - uncomment selected row or rows

7 Open Table in Design View - Design view is user friendly sometime helps
a right click o open table
b right click table in object explorer
c '08 e for edit
'05 o for open table
d Ctrl+1, Ctrl+2, Ctrl+3 opening dialog, Criteria, SQL panes

8 right click x Execute (in design view)

9 Alt+F, Enter -- Connect to Server - Always have to connect to a server

10 Full Screen classic studio hotkey combo Enjoy full screen it's stream lined
a Shift + Alt + Enter Full Screen
b Alt U Non Full Screen

11 Ctrl + Alt + L Open Solution Explorer

12 Alt + V, L = Template explorer SSMS '08 it's a nice resource for us

13 Scripting - IWe have to script many things such as tables sp's Here is how when the item is selected in object explorer
right click, s,
a, c To script stored procs to clipboard

14 Ctrl-Shift-A / Alt-Shift-A: add new item to project

15 Cntl + M Include Actual Execution Plan - great to refine & speedup T-SQL

16 F4 properties not used much for me in ssms but vs very often

The next post regarding SSMS has to involve some more T-SQL since it is the best feature of SQL Server IMHO.

Bye 4 now!


Anonymous said...

I recently came accross your blog and have been reading along. I thought I would leave my first comment. I dont know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.


Zarick Lau said...

What version of MSSMS support this hotkey?

Can you share the official reference for this hotkey.

I'm using 2005, but the C-E doesn't work for me.

Zarick Lau said...

Please forget the C-E, it is a short key mentioned in somewhere else which are supposed to execute one statement, but it doesn't work.
I mixed up something, actually, you post doesn't mentioned about Ctrl-E, just ignore this!

However, does MS SQL server document included some chapter on Hotkey?

I'm very much used to hotkey, so, I'd like to know all hotkey available for use.

Catto said...

Hey Now Zarick,

I thank you for your comment.
If you are referring to

#7 Opening Table in Design View

by Design view I mean to open a table with all 4 panes open (Dialog, Critera, SQL, Results)

In 2005
first Open Object Explorer (F8)
Then select/highlight the table
Then right click
Then select open or press O
(in 2008 select edit or press e)
Then Press & hold Ctrl
Press & Release 1
Press & Release 2
Press & Release 3

then you should be able to view all 4 panes. This is a more user friendly screen more graphical than just a new query window when querying data.

Hope that explains #7 better.

Thx 4 reading,

Anonymous said...

Very nice - easy to follow, simple, and working. Thanks for the knowledge!
More templates easy to download