Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server 2005 metadata search to get stored procedure parameters

How do you get a list of the input parameters for a stored procedure using metadata in SQL Server 2005? I want to do a SELECt on it and then iterate through the variable names.

like image 639
Caveatrob Avatar asked Nov 26 '25 18:11

Caveatrob


1 Answers

start here

select * from information_schema.PARAMETERS
where SPECIFIC_NAME = 'YourStoredProcedureName'
order by ORDINAL_POSITION

look for parameter_name, data_type, parameter_mode

like image 190
SQLMenace Avatar answered Nov 28 '25 16:11

SQLMenace