插入临时表
如下面的代码
Select ID,Color from TrimPO_InputData where HeadID=1
Union all
Select ID,Color from TrimPO_InputData where HeadID=1
Union all
Select ID,Color from TrimPO_InputData where HeadID=1
select * into #tmp from
(
Select ID,Color from TrimPO_InputData where HeadID=1
Union all
Select ID,Color from TrimPO_InputData where HeadID=1
Union all
Select ID,Color from TrimPO_InputData where HeadID=1) a