Dec 21, 2014

Find procedures which has a specified parameter with a SQL script

The relevant INFORMATION_SCHEMA view that you could use is PARAMETERS. This query will list all stored procedures that have such a parameter:

Note: This Query also can use to find procedures which has a specified table, pass table name in parameter.

DECLARE @x=’myTableName’

SELECT DISTINCT p.SPECIFIC_NAME
FROM  INFORMATION_SCHEMA.PARAMETERS p
WHERE p.PARAMETER_NAME = '@x'