Cloud Training (Online)

SQL Server – Shortcut to display the Stored procedure Code

Are you looking at displaying the stored procedure code quickly with-in your SQL Server Management Studio ?. Here’s how you do it.

How to display SP Code in SQL Server Management Studio ?

Open SQL Management Studio and connect to the server.

1.Type the following script in the Query Editor and hit the Execute button (F5). Note that the name of the stored procedure in this example is “sptest”.

sp_helptext ‘sptest’

2. You should see the SP code in the Results to Text window.

Senthil Kumar B
Senthil Kumar is a former Microsoft MVP (Most Valuable Professional). He is a Co-Author of the book "Windows 10 Development Recipes using JavaScript and CSS" for Apress Publication. He is a technical presenter, blogger, mentor and a Geek.  Senthil is a regular speaker is various local user groups. He has presented at conferences like Great Indian Developer Summit (GIDS) & Microsoft DevCamps. You can reach out to him via his Twitter handle @isenthil.