Can I use the same foreign key constraint in two different tables?

前端 未结 2 1273
挽巷
挽巷 2021-01-13 15:28

I am trying to create a database for work. I have two different types of users: internal and external. Each type has different properties so I just created two separate tabl

2条回答
  •  南笙
    南笙 (楼主)
    2021-01-13 16:07

    Names of FKs have to be unique. You need to use two different FK names. I would further suggest that you should include information about the tables being linked in the key name to make it more descriptive.

提交回复
热议问题