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.
2 つのテーブルの結合から一時テーブルへのコピーに問題があります。
私が使用しているコードは
Select * into #tmp from table1 union table2
SELECTforがありませんtable2
SELECT
table2
SELECT * INTO #tmp FROM table1 UNION SELECT * FROM table2
SQL フィドル
代わりにこれを試してください:
select * into #temp from (select * from table1 union select * from table2 ) t;