How to create Custom Shortcuts in SQL Server Management Studio ( SSMS) - SQL Server / TSQL tutorial Part 10


You can create shortcut for most commonly used Stored Procedures so you don't have to write every time. You can simple use Shortcut keys to run them.


Open SQL Server Management Studio (SSMS). To to Tools and then go to options as shown below.
How to create shortcuts in SSMS For mostly used Stored Procedures - SQL Server Tutorial

Go ahead and add the Stored Procedures in front of Shortcuts. I have added sp_order user Stored Procedure in front of Ctrl+3. 

How to create Shortcuts for Stored Procedures in SSMS - SQL Server Tutorial

Once you open the New Query and then Press Ctrl+1, it will run sp_who Stored Procedure. You don't have to worry about scope of database as it will run in any database. 

To use the Shortcut for sp_Order , you need to change the Query scope to Database in which sp_Order exists. If you will run in any other database, it will through an error as Stored Procedure will not be present.

1 comment: