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 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.

NUnit : Introduction

There are several unit test tools in the market, but one of them is NUnit, the most popular tool for doing unit testing. So in this tutorial...