sp_helptext for viewing definition in SQL Server
In SQL Server, the sp_helptext system stored procedure is a handy tool for the developers to retrieve the definition of SQL Server objects such as stored procedure, views, triggers and user-defined functions. This is much faster than navigating through a GUI or other tools. Give it a try
sp_helptext 'procedure_name'
USE AdventureWorks;
GO
sp_helptext 'usp_GetOrders';
CREATE PROCEDURE [dbo].[usp_GetOrders]
@StartDate DATETIME,
@EndDate DATETIME
AS
BEGIN
SELECT *
FROM Sales.SalesOrderHeader
WHERE OrderDate BETWEEN @StartDate AND @EndDate
END

