--identity(1,1)只能加在新建的列上,已存在的不能加。可以先删除原来的列,再新加。
alter table buka_biao
drop column id
go
alter table buka_biao
add id int identity(1,1) not null
go
identity(1,1)
最新推荐文章于 2023-09-14 17:45:57 发布

--identity(1,1)只能加在新建的列上,已存在的不能加。可以先删除原来的列,再新加。
alter table buka_biao
drop column id
go
alter table buka_biao
add id int identity(1,1) not null
go