嵌套在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://*.com/questions/3039200/tsql-call-a-stored-procedure-from-another-存储过程和读取结果 [ ^ ]并阅读相关链接;)
Have a look here: http://*.com/questions/3039200/tsql-call-a-stored-procedure-from-another-stored-procedure-and-read-the-result[^] and read related links ;)