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