Quick Tips

View Definition of Stored Procedure in T-SQL


Transact-SQL is the flavor of SQL used in Microsoft SQL. A stored procedure can be thought of as a named collection of SQL statements. Its kind of like a function in other programming languages.  Sometimes its helpful for me to be able to peak at the definition of a stored procedure in order to understand what's happening under the hood. Here's the line of code that I use:

-- View definition of stored procedute in T-SQL
EXEC sp_helptext N'SP NAME HERE';

Disclaimer: The opinions expressed here are my own personal opinions and do not represent my employer's view in any way.