这个问题与这个类似,但是针对的是SQL Server 2005:
我在我的数据库中有2个表:
--'#' denotes the primary key
[Libraries]
#ID #Application Name
1 MyApp Title 1
2 MyApp Title 2
[Content]
#ID Application LibraryID Content
10 MyApp 1 xxx
11 MyApp 1 yyy
(数据库显然更加复杂,拥有这种双重键是有意义的)
每个库都由其唯一ID和应用程序名称标识。我试图确保每个内容都正确引用了现有库。
在使用向导创建约束时:
Primary key table Foreign key table
[Libraries] [Content]
ID ---> LibraryID
Application ---> Application
我遇到了以下错误:
表 'Libraries' 的列没有匹配现有的主键或唯一约束条件
您知道这是怎么回事吗?如果可能的话,能否使用SQL Server解决?(我无法修改[Library]表)
非常感谢您的帮助!