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.

Leave a Reply

Your email address will not be published. Required fields are marked *