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 * from A union all select * from B union all select * from C
SELECT * INTO #SomeTempTable FROM (SELECT * FROM A UNION ALL SELECT * FROM B UNION ALL SELECT * FROM C) D
请尝试以下操作:
Insert Into #Temp select * from A union all select * from B union all select * from C