How to view the stored procedure code in SQL Server Management Studio

后端 未结 9 639
予麋鹿
予麋鹿 2021-01-30 19:35

I am new to SQL Server. I am logged into my database through SQL Server Management Studio.

I have a list of stored procedures. How do I view the stored procedure code?

9条回答
  •  爱一瞬间的悲伤
    2021-01-30 19:58

    exec sp_helptext 'your_sp_name' -- don't forget the quotes

    In management studio by default results come in grid view. If you would like to see it in text view go to:

    Query --> Results to --> Results to Text

    or CTRL + T and then Execute.

提交回复
热议问题