How to create a custom shortcuts in SQL Server

How to create a custom shortcuts for stored procedures in SQL Server ?

In SQL Server, you can create a custom shortcut for stored Procedures . As a SQL developer somtimes, you have to monitor the output of any table or stored procedure frequently, so how will it be if you create a shortcuts to execute that stored procedue instead of writing stored procedure name again and again then executing it, definitely that will save your time .

If you want to monitor any table data , you can write a stored procedure for that and create a shortcut to execute that stored procedure.

If you do not know , how to create a stored procedures then you can also read that post :How to create a Stored procedures in SQL server.

Following are the steps to create a custom shortcut to execute stored procedure.

Suppose you want to monitor the latest top 100 customer data. So for this you have to create a stored procedure first than create a shortcut to execute that stored procedure.

Lets create a stored procedure first, If you do not want to create stored procedure you can use any existing stored procedure.


create proc get_customer
select top 100 * from customer order by 1 desc


Now you can create a shortcuts by following below steps.

> Click ot Tools Tab > then , Click on Options.. in context menu

Once you click on options.. a pop up window opens

>Click on keyboard > Next, click on Query Shortcuts >


> Next, In Query Shortcuts: pane > Put your stored procedure name against any shortcuts that you like.



Now , press your shortcut code at any query editior window .

Lets see the output of stored procedure by pressing shortcut key that isĀ  ctrl + 3 , as you can see it executes the stored procdure which returns data.


 185 total views,  2 views today

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.