--重复ID的记录,只显示其中1条 --生成原始表 select * into #tempTable from ( select '1' as id ,'a' as name union all select '1' as id ,'b' as name union all select '2' as id ,'c' as name union all select '2' as id ,'d' as name ) a --查询原始表 select * from #tempTable --增加序…