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

前端 未结 11 1127
梦谈多话
梦谈多话 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:11

    I've found another way to get this error. This can also happen if you are trying to make a recursive foreign key (a foreign key to the primary key in the same table) in design view in SQL Management Studio. If you haven't yet saved the table with the primary key it will return this message. Simply save the table then it will allow you to create the foreign key.

提交回复
热议问题