Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在从两个表的联合复制到临时表时遇到问题。
我正在使用的代码是
Select * into #tmp from table1 union table2
你缺少一个SELECTfortable2
SELECT
table2
SELECT * INTO #tmp FROM table1 UNION SELECT * FROM table2
SQL小提琴
试试这个:
select * into #temp from (select * from table1 union select * from table2 ) t;