sql – 由于IDENTITY_INSERT为OFF,因此无法插入显式值,但不能将IDENTITY_INSERT设置为ON,因为它已经开启
我在数据库Foo中有一个名为Bar的表,它有一个名为ID的列,它是主键,此数据库生活在开发SQL Server上. 我正在尝试将数据从我们的生产服务器复制到开发服务器中,以便我可以使用所述数据,因此我执行以下操作: set IDENTITY_INSERT Foo.dbo.Bar ON
insert into Foo.dbo.Bar
(
ID
,Something
,Else