嵌套在SQL Server中的存储过程 [英] Stored procedure nesting in SQL server

查看:87
本文介绍了嵌套在SQL Server中的存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个存储过程,它返回三个结果集(作为数据表)。我想从另一个SP(SP2)调用此SP并将这些结果集提供给该SP或至少一个表..



提前感谢。

i have a stored procedure, which return three resultsets(as datatable). I want to call this SP from another SP(SP2) and get these resultset to that SP or atleast one table ..

thanks in advance.

推荐答案

查看示例...

See example...
create table #temp
( field1 nvarchar(146), field2 sysname, field3 nvarchar(64), field4 nvarchar(64),field5 nvarchar(64),field6 nvarchar(64),field7 nvarchar(2126))

insert into #temp ( field1 , field2 , field3 , field4 ,field5 ,field6 ,field7 )

exec sp_helpconstraint 'existingtable' ,'nomsg'

select * from #temp



快乐编码!

:)


Happy Coding!
:)


看看这里: http://stackoverflow.com/questions/3039200/tsql-call-a-stored-procedure-from-another-存储过程和读取结果 [ ^ ]并阅读相关链接;)
Have a look here: http://stackoverflow.com/questions/3039200/tsql-call-a-stored-procedure-from-another-stored-procedure-and-read-the-result[^] and read related links ;)


这篇关于嵌套在SQL Server中的存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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