Why is a primary-foreign key relation required when we can join without it?

前端 未结 5 856
攒了一身酷
攒了一身酷 2020-12-02 08:31

If we can get data from two tables without having primary and foreign key relation, then why we need this rule? Can you please explain me clearly, with suitable example? It\

5条回答
  •  臣服心动
    2020-12-02 08:46

    You need two columns of the same type, one on each table, to JOIN on. Whether they're primary and foreign keys or not doesn't matter.

提交回复
热议问题