我想要一个外键在两个表之间,所以我尝试像我一直这样做。现在我遇到的问题是他无法创建,并且看起来它无法创建,因为已经有一个键,但没有。外键无法创建
- Unable to create relationship
'FK_tbl_Paramed_RegistratieBehandelingen_Users'.
The ALTER TABLE statement conflicted with the
FOREIGN KEY constraint "FK_tbl_Paramed_RegistratieBehandelingen_Users".
The conflict occurred in database "Nestor_Server",
table "dbo.Users", column 'UserID'.
伊夫检查,如果他们有相同的类型,他们这样做(BIGINT),所以不知道为什么,他不会创建它
是一个空值滑落导致网络似乎这就是为什么它继续失败。谢谢 –
正是..我只是有同样的问题。要测试是否属于这种情况,请尝试使用“NO CHECK”创建外键。这将创建密钥,但如果现有数据与您尝试创建的确切外键规则不匹配,则不会发生。 –