--创建自增长ID
alter table tableA add
ZZZID int identity(1,1)
--删除重复的
delete tableA where zzzid in (
select zzzid from tableA a where zzzid not in (
select min(zzzid) from tableA b
where a.Name = b.Name
)
)
--删除自增长ID
alter table tableA drop column ZZZID