Find procedure and function in SQL Server

ROUTINE_TYPE = 'PROCEDURE' OR  'Function'

 

Select ROUTINE_TYPE,SPECIFIC_NAME,ROUTINE_DEFINITION

FROM   INFORMATION_SCHEMA.ROUTINES

WHERE  OBJECTPROPERTY(OBJECT_ID(SPECIFIC_NAME),'IsMSShipped') =0

       AND ROUTINE_DEFINITION  like '%prcleave%'

       AND ROUTINE_TYPE='PROCEDURE'
Ebook Download
View all
Learn
View all