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 that have a specified table, pass the table name in the parameter.
DECLARE @x=’myTableName’
SELECT DISTINCT p.SPECIFIC_NAME
FROM INFORMATION_SCHEMA.PARAMETERS p
WHERE p.PARAMETER_NAME = '@x'
Note: This Query also can use to find procedures that have a specified table, pass the table name in the parameter.
DECLARE @x=’myTableName’
SELECT DISTINCT p.SPECIFIC_NAME
FROM INFORMATION_SCHEMA.PARAMETERS p
WHERE p.PARAMETER_NAME = '@x'
No comments:
Post a Comment
Please do not enter any spam link in the comment box.