Automatically resolve primary key merge conflict

前端 未结 3 1577
说谎
说谎 2021-01-23 01:16

could you please suggest me the way I could automatically resolve primary key conflicts during a merge between Publisher and Subscriber. It seems Sql Server doesn\'t do it out o

3条回答
  •  离开以前
    2021-01-23 02:12

    Have you tried WHEN MATCHED THEN and WHEN NOT MATCHED BY TARGET THEN to do an UPSERT (conditional UPDATE or INSERT)?

    Documentation can be found here.

    I'm assuming the primary key represents the same item in both DBs.

提交回复
热议问题