Retrieve Related Stored Procedure

Below is the SQL query that used to retrieve any related stored procedure for the table:

SELECT Name
FROM sys.procedures
WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE ‘%TABLE NAME%’

Kindly change the TABLE NAME to your target table.

This query is quite useful when you are not sure if there is any other stored procedures available there.

Leave a Reply

Your email address will not be published. Required fields are marked *