放临时表再union all create table #T1(collist...) insert #T1 exec P_select ... create table #T2(collist...) insert #T2 exec P_select ... go select * from #t1 union all select * from #t2
可以用临时表,一个就行create table #tb (结果集所有字段)insert into #tb exec P_select ... insert into #tb exec P_select
用表和临时表都行 insert into #tb exec 过程 insert into tb exec 过程select * from #tb union select * from tb
create table #T1(collist...)
insert #T1 exec P_select ...
create table #T2(collist...)
insert #T2 exec P_select ...
go
select * from #t1
union all
select * from #t2
insert into #tb exec P_select
用表和临时表都行
insert into #tb exec 过程
insert into tb exec 过程select * from #tb union select * from tb