如何在存储过程中,调用另一存储过程的结果集

创建一个存储截过程xx,从表t1中返回结果集

crateproc xx
(@pp int)
as
select * from t1 

创建另一存储过程yy,调用xx,并将xx的结果集加入临时表#t2

create proc yy

as

select * into #t2  from t1 where 1<>1

insert  #t2 exec xx 1
select * from #t2  

drop table #t2

原文地址:https://www.cnblogs.com/biyyss_sun/p/2219147.html