Well, if i want to find parameter count of any stored procedure or function inside SQL SERVER, what is the correct way to do it.
Your help would be appreciated. thanks.
Try the following query to get a list of all parameters for a stored procedure. Change the select to a COUNT(*) if you just want the number of parameters.
SELECT
p.name AS Parameter,
t.name AS [Type]
FROM sys.procedures sp
JOIN sys.parameters p
ON sp.object_id = p.object_id
JOIN sys.types t
ON p.system_type_id = t.system_type_id
WHERE sp.name = '<name>'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With