Thursday , February 21 2019
Home / DataBase / SQL SERVER / How to Create Query Shortcuts in SQL Server Management Studio

How to Create Query Shortcuts in SQL Server Management Studio

In this article, we are going to see some shortcuts that may be useful to you when you work with SQL Server Management Studio. You can always use some custom queries as query shortcuts in SSMS.

You can create shortcuts for frequently used queries in Management Studio, some of the shortcuts are predefined, like pressing “Ctrl + 1” will execute “sp_who”. You can create shortcuts for your own queries or change the existing shortcuts. Here I am going to show some of the most used  queries shortcuts. I hope you will like this.

To create a new shortcut, go to Tools > Options > Environment > Keyboard in Management Studio.
For example, you can create a shortcut for:


Now I am Adding my regular two shortcuts

  1.  ctrl+3 for count of rows
  2. ctrl+4 for select statement

I have added my shortcuts in Query shortcuts panel under ctrl+3 and ctrl+4 and click ok.


Note: Before you can use this shortcut you will need to restart Management Studio or close current query window and reopen it.

To execute above shortcuts use below procedure:

  • Type fully qualified table name, e.g. Database.Schema.Table
  • Highlight the name and press “Ctrl + 3” (or the key you have assigned in your Shortcuts environment)

For Example here my table name is Customer.

select Customer and press Assigned shortcut key (ctrl+4)



here is another example i want to get count of rows in table

for doing this just select table name and press Assigned shortcut key (ctrl+3)



Did I miss anything that you may think would help? Did you find this post as useful? I hope you liked the article. Please share your valuable suggestions and feedback in the comments.


Print Friendly, PDF & Email

Give us your valuable feedback


About Murali

Hello everyone I am Software Developer having 3+ years of Experience in Microsoft Technologies and Others. My skills :-, C#,, SQL SERVER, web services, windows Service,Windows applications,HTML,CSS, JavaScript,JQuery,AnjularJs

Check Also

sql server backup script

Backup all databases in SQL Instance with one script

Backup: A copy of SQL Server data that can be used to restore and recover the …