can we have a foreign key which is not a primary key in any other table?

前端 未结 4 688
春和景丽
春和景丽 2020-12-02 20:29

it is written in every book that foreign keys are actually primary key in some other table but can we have a foreign key which is not primary key in any other table

4条回答
  •  心在旅途
    2020-12-02 21:11

    Yes , There can be a foreign key which is unique key in other table as Unique key is subset of primary key but not the exact primary key.

    So that's possible that foreign key is unique key in aother table.

提交回复
热议问题