创建一个存储截过程xx,从表t1中返回结果集
crateproc xx(@pp int)asselect * from t1
创建另一存储过程yy,调用xx,并将xx的结果集加入临时表#t2
create proc yy as select * into #t2 from t1 where 1<>1 insert #t2 exec xx 1select * from #t2 drop table #t2
create proc yy
as
select * into #t2 from t1 where 1<>1
insert #t2 exec xx 1select * from #t2
drop table #t2