Are multiple foreign keys in a single field possible?

前端 未结 3 868
攒了一身酷
攒了一身酷 2021-01-15 16:47

I want to know if there is a way to have multiple values in a single field in a MySQL database where each value is a foreign key referencing one other table.

I am de

3条回答
  •  广开言路
    2021-01-15 16:58

    A single field cannot be a foreign key to more than one field in another table. It's just not possible. Since your foreign table has a composite key, your table in question would have to have the same fields as well.

提交回复
热议问题