SELECT parm.name AS Parameter,
typ.name AS [Type]
FROM sys.procedures sp JOIN sys.parameters parm
ON sp.object_id = parm.object_id
JOIN sys.types typ
ON parm.system_type_id = typ.system_type_id
WHERE sp.name = 'sp_test'
I have written the above query to get the name and datatype of parameters of a stored procedure
Can I get the last values passed to these parameters; so my result set will be
Parameter datatype value
name varchar(100) 'John'
age int 30
Thanks
typ.name AS [Type]
FROM sys.procedures sp JOIN sys.parameters parm
ON sp.object_id = parm.object_id
JOIN sys.types typ
ON parm.system_type_id = typ.system_type_id
WHERE sp.name = 'sp_test'
I have written the above query to get the name and datatype of parameters of a stored procedure
Can I get the last values passed to these parameters; so my result set will be
Parameter datatype value
name varchar(100) 'John'
age int 30
Thanks