SQL Server 2008: The columns in table do not match an existing primary key or unique constraint

前端 未结 11 1186
梦谈多话
梦谈多话 2020-12-28 11:50

I need to make some changes to a SQL Server 2008 database.

This requires the creation of a new table, and inserting a foreign key in the new table that references t

11条回答
  •  失恋的感觉
    2020-12-28 12:14

    If you have data in your tables this could be the issue.

    In my case I had some data in the Account table that I loaded at 3 pm, and some data in Contact table that I loaded at 3:10 pm, so Contact table had some values that weren't in my Account table yet.

    I ended up deleting these values from the contact table and then managed to add a key without any problems.

提交回复
热议问题