文章日志
日志类别:数据库
2016-10-12 16:16

--创建自增长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



1    0
昵称: