Setup Query Shortcuts in SQL Server

Arunjith
Posted by in Sql Server category on for Beginner level | Points: 250 | Views : 5233 red flag
Rating: 4.67 out of 5  
 3 vote(s)

SQL Server Management studio provides a very useful functionality called query shortcuts. This makes the task of querying the sql server easier. Just by pressing two keys on the keyboard a complex query can be executed.

Introduction


SQL Server Management studio provides a very useful functionality called query shortcuts. This makes the task of querying the sql server easier. Just by pressing two keys on the keyboard a complex query can be executed.


Steps to setup query shortcut in SSMS in detail:

1) Select tools menu and then select options

2) In the options expand environment and then click on Keyboard.

3) In the query shortcuts plane give the query in the Stored Procedures section for one of the shortcuts.


4) Click OK


As shown in the screen shot above the shortcut is ctrl+3.


Example : -
SELECT  * FROM Customer
 
In order to execute this query using shortcut just type table name like
 Customer
and select the table_name  and press ctrl+3.


NB: When a new query shortcut is created you have to open a new query  window for using this.
All the open query windows will not  get this shortcut



Page copy protected against web site content infringement by Copyscape

About the Author

Arunjith
Full Name: Arunjith P.S
Member Level: Starter
Member Status: Member
Member Since: 6/12/2012 4:23:22 AM
Country: India

http://www.dotnetfunda.com

Login to vote for this post.

Comments or Responses

Login to post response

Comment using Facebook(Author doesn't get notification)