How to get the stored procedure result set value

别说谁变了你拦得住时间么 提交于 2019-12-24 03:25:49

问题


I create a stored proc A that calls another proc B, which returns a list of the result set.

How I can use these result set values in my proc A as I have to use this result set value one by one to pass to other part of the proc A.


回答1:


You can perform an INSERT INTO to insert the results of the stored procedure into a (temporary) table. You can then use a select statement to process these results.

INSERT INTO SomeTableThatMatchesTheSproc
EXEC YourStoredProcedure;

SELECT * FROM YourTable;


来源:https://stackoverflow.com/questions/5455737/how-to-get-the-stored-procedure-result-set-value

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!