I\'m trying to get a list of stored procedures in t-sql. I am using the line:
exec sys.sp_stored_procedures;
I would like to filter the result
SELECT [Routine_Name]
FROM [INFORMATION_SCHEMA].[ROUTINES]
WHERE [ROUTINE_TYPE] = 'PROCEDURE'
Select items from the sysobjects table and use a where clause type = 'P'
for stored procedures and filter on name
.
Rather than using the Stored Procedure you can use the following views:
Select * From sys.procedures
Where [Type] = 'P'
or
Select * From Information_Schema.Routines