删除sql表中重复数据

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

posted on 2012-12-15 13:25  天亦玄  阅读(138)  评论(0编辑  收藏  举报

导航