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 as begin select top 100 * from customer order by 1 desc end
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