How do I find the parameters for a specified stored procedure or function?
USE
<database_name>;
GO
SELECT
SCHEMA_NAME(schema_id) AS schema_name
,o.name AS object_name
,o.type_desc
,p.parameter_id
,p.name AS parameter_name
,TYPE_NAME(p.user_type_id) AS parameter_type
,p.max_length
,p.precision
,p.scale
,p.is_output
FROM
sys.objects AS o
INNER
JOIN sys.parameters AS p ON o.object_id = p.object_id
WHERE
object_id = OBJECT_ID('<schema_name.object_name>')
ORDER
BY schema_name, object_name, p.parameter_id;
GO
Comments
Anonymous comments are disabled
About SQL Master
**__________________________________**
SQL Server MVP, Sr. DBA & industry expert.
-
Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it. It is also a power and you will gain by sharing it.