例,B1表中ID应为主键,但建表时未设,表中有重复,删除语句如下:select id,max(c1) as c1,max(c2) as c2,... into #temptable from b1 group by id godelete from b1goinsert into b1 select * from #temptablegodrop table #temptablego
可以建立唯一索引,