Sql-server – How to view the stored procedure code in SQL Server Management Studio

sql serverssmstsql

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?

Right clicking on the stored procedure does not have any option like view contents of stored procedure.

Thanks.

Best Answer

I guess this is a better way to view a stored procedure's code:

sp_helptext <name of your sp>