且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SQL Server:删除一个 FK 约束,它不是外键

更新时间:2023-02-03 07:45:22

没有这个限制

第一个错误清楚地表明它不能创建该约束,因为所涉及的这两列的数据类型(Game.IdTester.Game代码>) 不匹配.

The first error clearly says that it could NOT create that constraint since the datatypes of those two columns involved (Game.Id and Tester.Game) do not match.

您应该做的是检查您是如何创建导致第一个错误的 FK 约束 - 并明确为该 FK 约束指定一个有意义的名称!

What you should do is check how you're creating your FK constraint that leads to that first error - and explicitly give that FK constraint a meaningful name!