Sometimes , We need to know what is the structure of stored procedure ? , How many columns will be return ?
So to determine this we have easy stored procedure provided by SQL Server which is sp_describe_First_Result_Set.
Below is the template to run it. You can provide your stored procedure name as variable
Execute sp_Describe_First_Result_set ‘ProcedureName’
In below snap I used Adventureworks database and try to find what will be the output columns of the stored procedure “uspgetBillOfMaterials”
As you see in below image after running above query we got all the result set columns
I hope this tip help you somewhere.
Enjoy !!!