1.select identity(int,1,1) as autoID, * into #Tmp from tablename
2.select min(autoID) as autoID into #Tmp2 from #Tmp group by 字段1,字段2
3.select * into #Tmp3 from (select * from #Tmp where autoID in(select autoID from #tmp2)) t
1.select identity(int,1,1) as autoID, * into #Tmp from tablename
2.select min(autoID) as autoID into #Tmp2 from #Tmp group by 字段1,字段2
3.select * into #Tmp3 from (select * from #Tmp where autoID in(select autoID from #tmp2)) t