View the Definition of a Stored Procedure
You can view the definition of a stored procedure in SQL Server Management Studio using Object Explorer menu options or in the Query Editor using Transact-SQL. This topic describes how to view the definition of procedure in Object Explorer and by using a system stored procedure, system function, and object catalog view in the Query Editor.
You can use one of the following:
Using SQL Server Management Studio
To view the definition a procedure in Object Explorer
In Object Explorer, connect to an instance of Database Engine and then expand that instance.
Expand Databases, expand the database in which the procedure belongs, and then expand Programmability.
Expand Stored Procedures, right-click the procedure and then click Script Stored Procedure as, and then click one of the following: Create To, Alter To, or Drop and Create To.
Select New Query Editor Window. This will display the procedure definition.
To view the definition of a procedure in Query Editor