[DB]sql server 中设置主键自增长

自动编号:建表时用IDENTITY (SEED,INCREMENT)参数(seed -启始值,increment -增量)

alter table user_info add id int Identity(1,1)

user_info是表名 id 是要进行自动编号的字段属性名。

也可以直接设置:如图

原文地址:https://www.cnblogs.com/wanping/p/2609955.html