ID为主键,在创建的时候忘了设置标识,现在想用SQL语句修改ID标识为“是”增量1要怎么写
------解决方案--------------------
- SQL code
alter table 表名 drop column 字段名 alter table 表名 add 字段名 int identity(1,1)
------解决方案--------------------
alter table tbname add id int identity(1,1)
alter table 表名 drop column 字段名 alter table 表名 add 字段名 int identity(1,1)
------解决方案--------------------
alter table tbname add id int identity(1,1)