SQL Server 如何设置ID自增 许翔 2022-06-08 257 阅读1分钟 自增列不能直接修改,必须将原有ID列删除,然后重新添加一列具有identity属性的id字段。比如你要修改的字段名为id: alter table 表名 drop column id alter table 表名 add id int identity(1,1)