Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在开始之前,这里是我的sql数据库模型供参考。
这是我的计划:ProductType可以有很多Shipment Order,但 Shipment Order 只能有一个 ProductType。当我尝试建立关系时,我得到了这个:
ProductType
Shipment Order
我已经阅读了有关此的其他线程,但老实说,我不知道如何将它应用到我的案例中,也不知道修复它的正确方法。
已经有一个表有一个名为 的约束ProductType_Base_ID。您可以使用以下查询找到该表:
ProductType_Base_ID
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_NAME = 'ProductType_Base_ID';
但是你真的不需要找到它,只需为这个外键约束使用不同的名称。