Stored Procedure return multiple result sets

前端 未结 2 1723
庸人自扰
庸人自扰 2020-12-10 04:57

I need a SP to return multiple sets of results. The second set of results would be based on a column of the first set of results.

So:

declare @myTabl         


        
2条回答
  •  醉酒成梦
    2020-12-10 05:50

    At the end of the Stored Proc, put:

    SELECT * FROM @myTable1
    SELECT * FROM @myTable2
    

    This will return 2 result sets.

提交回复
热议问题