set identity_insert 表名 ON--打开
insert语句...;
insert语句...;
.
.
.
set identity_insert 表名 OFF--关闭
SqlServer数据库当 IDENTITY_INSERT 设置为 OFF 时,不能为表中的标识列插入显式值。
于 2021-06-21 11:45:12 首次发布
set identity_insert 表名 ON--打开
insert语句...;
insert语句...;
.
.
.
set identity_insert 表名 OFF--关闭