Total Pageviews

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

Blog Archive

Ideal SQL Query For Handling Error & Transcation in MS SQL

BEGIN TRY BEGIN TRAN --put queries here COMMIT; END TRY BEGIN CATCH IF @@TRANCOUNT>0 BEGIN SELECT @@ERROR,ERRO...