Retrieving a filtered list of stored procedures using t-sql

后端 未结 3 1021
我在风中等你
我在风中等你 2021-02-18 22:26

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

相关标签:
3条回答
  • 2021-02-18 23:15
    SELECT [Routine_Name]
    FROM   [INFORMATION_SCHEMA].[ROUTINES]
    WHERE  [ROUTINE_TYPE] = 'PROCEDURE'
    
    0 讨论(0)
  • 2021-02-18 23:24

    Select items from the sysobjects table and use a where clause type = 'P' for stored procedures and filter on name.

    0 讨论(0)
  • 2021-02-18 23:30

    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
    
    0 讨论(0)
提交回复
热议问题