摘要:
有一次需要向表里插入一条记录,要求指定主键的值,可是sql server提示:Msg 544, Level 16, State 1, Line 1Cannot insert explicit value for identity column in table 'table_name' when IDENTITY_INSERT is set to OFF中文的提示应该是“当IDENTITY_INSERT 设置为OFF时,不能向表中的标识列插入显示值”,查了资料可以这样操作set IDENTITY_INSERT table_name on然后插入数据:insert into ta 阅读全文