标签: sql select
我在从两个表的联合复制到临时表时遇到问题。
我正在使用的代码是
Select * into #tmp from table1 union table2
答案 0 :(得分:4)
您错过SELECT
SELECT
table2
SELECT * INTO #tmp FROM table1 UNION SELECT * FROM table2
SQL Fiddle
答案 1 :(得分:1)
请改为尝试:
select * into #temp from (select * from table1 union select * from table2 ) t;