Keyboard shortcuts play an important role to increase the productivity, in any development environment . There are tons of shortcuts that are beneficial in SQL Server Management Studio. SSMS 2005/2008 also allow you to easily add your own keyboard shortcuts.
The two shortcuts that I always create are the SELECT TOP 1000 * FROM and SELECT COUNT(*) FROM. These allow you to select any table or view in your window and quickly see a sample of the data or get a row count.
This is simple to set up in SSMS 2005/2008.
1. Tools –> Options
2. Environment –> Keyboard
3. Add the following shortcuts to the Query Shortcuts. I set the SELECT * as the Ctrl+5 because execute is F5, so it is easy to remember. Make sure you include a space after the FROM.
a. Ctrl+5: SELECT TOP 1000 (*) FROM
b. Ctrl+6: SELECT COUNT(*) FROM
4. After you apply the changes make sure you open a new session
5. Now just select any tables and press your new shortcut.
Here are some other helpful shortcuts in SSMS that I use all the time


December 13th, 2010

Posted in
Tags: 
[...] Once you have created the procedure you can create a keyboard shortcut to call the stored procedure. This will let you highlight any string in Management Studio and quickly find any references to it. To set up a keyboard shortcut see my previous post SQL Custom Keyboard Shortcuts. [...]
Hello Matt,
I am having problem while setting Custom Keyboard Shortcut. I added shortcut for “select * from ” with Ctrl+5 key. Then I opened new query window, selected the tablename and executed the Ctrl+5 But I am getting the following error
“.Net SqlClient Data Provider: Msg 102, Level 15, State 1, Line 1
Incorrect syntax near ‘FROM’.
”
Could you please help me to do the setting?
Thanks.