DotNet Friends

October 11, 2008

Get Parameter List from StoreProcedure or Function in SqlServer 2005

–get all storeprocedure and function

SELECT * FROM INFORMATION_SCHEMA.PARAMETERS

–pass storeprocedure name or function name

–get the relavent columns ParameterName,DataType,Length,ParameterType

SELECT Parameter_name as ParameterName,Data_type as DataType,coalesce(Character_Maximum_Length,0) as Length,Parameter_Mode as ParameterType FROM INFORMATION_SCHEMA.PARAMETERS

WHERE SPECIFIC_NAME=’sp_InsertOrder’

2 Comments »

  1. thanks..

    Comment by URVISH SUTHAR — January 3, 2009 @ 11:11 am

  2. Good collection

    see this blogs. I liked this blog, it has lots of
    nice articles

    Comment by kulveer — August 29, 2009 @ 8:47 pm


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.