-4

我想将此查询的结果集插入到存储过程中的临时表中。

select * from A
union all 
select * from B
union all 
select * from C
4

2 回答 2

3
SELECT *
INTO #SomeTempTable
FROM (SELECT *
      FROM A
      UNION ALL 
      SELECT * 
      FROM B
      UNION ALL 
      SELECT *
      FROM C) D
于 2013-10-23T18:14:05.070 回答
2

请尝试以下操作:

Insert Into #Temp
select * from A
union all 
select * from B
union all 
select * from C
于 2013-10-23T18:12:40.533 回答