0
点赞
收藏
分享

微信扫一扫

使用列表并且 IDENTITY_INSERT 为 ON 时,才能为表

原因:因为表中含有自增标识,无法直接为制定的序号做插入操作,需要更改标识

(先开启,执行后SQL后,在关上)

set identity_insert  C_User_Register on--设置标识列可以显示添加数据

insert into C_User_Register(PCId,PCUse,PCNote) values(100,1,'aaa')

set identity_insert C_User_Register off--设置标识列不可以显示添加数据 


举报

相关推荐

0 条评论