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

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

    If you have a composite key the order is important when creating a FK, and sometimes the order is not how it is displayed.

    What I do is go to the Keys section of the table1 and select script primary key as create to clipboard and then create FK using the order as shown in script

提交回复
热议问题