Tuesday, April 28, 2009

Get Parameter List Of Store Procedure in SQL SERVER

    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='GetProductInfoForAttributes'  
    --GetProductInfoForAttributes is my store procedure name 
    

thnx

No comments:

Post a Comment