TSQL:从另一个存储过程调用一个存储过程并读取结果 [英] TSQL: Call a stored procedure from another stored procedure and read the result

查看:33
本文介绍了TSQL:从另一个存储过程调用一个存储过程并读取结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个以 SELECT 结尾的存储过程,它返回一个记录集.我可以像这样在另一个存储过程中调用它:

I have a stored procedure that, ending with a SELECT, returns a recordset. I can call it within anoher stored procedure like this:

EXEC procedure @param

如何获取返回的记录集?谢谢

How to get the returning recordset? Thanks

推荐答案

您可以创建一个临时表,然后使用INSERT INTO #MyTable EXEC procedure @param.

You can create a temp table and then use INSERT INTO #MyTable EXEC procedure @param.

还有其他一些此处列出的技术.

这篇关于TSQL:从另一个存储过程调用一个存储过程并读取结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆