我想从 B 服务器的 A 服务器中的表中插入数据。
前任:
select count(*) from A.table
-- 100 rows affected
delete from A.table where customer_code = '100'
-- 10 rows affected
select count(*) from B.table
-- 200 rows affected
select count(*) from B.table where customer_code='100'
-- 20 rows affected
both the tables have identity(1,1) and primary_key
insert into A.table(customer_key,customer_code,custome_name)
select customer_key,customer_code,custome_name
from B.table where customer_code='100'
--违反主键约束。无法在对象“A.table”中插入重复键。
我已经试过了
SET IDENTITY_INSERT <> ON
DBCC CHECKIDENT(<>, RESEED,0)
我正在使用 SQL Server 2005。