{love to code?}

September 18, 2007

Getting parameter name from SQL Stored Procedure

Filed under: SQL — navaneethkn @ 9:05 am

I was trying to create an application which looks like SQL Enterprise manager using C#. I struggled with getting parameter name’s which is present in a Stored Procedure. Following query gives you all the parameters used in stored procedures.

SELECT * FROM INFORMATION_SCHEMA.PARAMETERS

Yes the above query will give all parameter in all stored procedures present in database. To filter with procedure specific parameters, use the following

SELECT * FROM INFORMATION_SCHEMA.PARAMETERS WHERE
specific_name = ‘ProcedureName’

Happy querying

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.