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.
我有一个表,它的主键是由三列构建的。在另一个表中,我想将它们作为一个单列外键引用。如何解决?也许是一个 id 别名?或者如何解决?
没有什么好的方法可以做到这一点,只需将三个都用作外键。您可以在原始数据上引入一个额外的唯一值列,并引用它,但这不是一个好方法。