use the INFORMATION_SCHEMA.parameters view
SELECT parameter_name, ordinal_position,parameter_mode,data_type
FROM INFORMATION_SCHEMA.parameters
WHERE SPECIFIC_NAME = 'USP_TableList'
use sys.parameters and join that with sys.types
SELECT s.name AS parameter_name,
parameter_id AS ordinal_position,
CASE is_output WHEN 0 THEN 'IN' ELSE 'INOUT' END Parameter_Mode,
t.name AS data_type
FROM sys.parameters s
JOIN sys.types t ON s.system_type_id = t.user_type_id
WHERE object_id = object_id('USP_TableList')
Here is the output
parameter_name | ordinal_position | parameter_mode | data_type |
---|---|---|---|
@id | 1 | IN | int |
@Date | 2 | IN | date |
@char | 3 | INOUT | char |
No comments:
Post a Comment