if exists(select * from syscolumns where id=object_id(‘表名‘) and name=‘列名‘) begin alter table 表名 drop column 列名 ; end alter table 表名 add 列名 int identity(1,1);
Sqlserver新增自增列
原文:https://www.cnblogs.com/ligl/p/9797102.html