Saturday, 17 September 2016

How to find all the user defined Stored Procedure in SQL server ?

In SQL server we can get the name and definition of the stored procedure & function using System View called INFORMATION_SCHEMA.

The following example provides you the list of stored procedure in the AdventureWorks database.


We can get the definition of the stored procedure in the ROUTINE_DEFINITION Column.

In above query i used the Routine_Type as PROCEDURE , So it returns only the stored procedure list and you can get the list of functions by passing the Routine_Type as Function.

No comments:

Post a Comment