SQL中identity(1,2)是什么意思?

如题所述

你这个应该缺少个字段类型

比如

create table a
(id int identity(1,2),
name varchar(10))

就是id字段是整型的自增字段

从1开始,每次+2

比如

insert into a(name) values ('a')
insert into a(name) values ('b')

a这条的id=1

b这条的id=3

温馨提示:答案为网友推荐,仅供参考

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网