Skip to content
Advertisement

Can I use two values of a foreign key in on table?

I have a ‘users’ table, and there is also a table ‘alerts’. And in the ‘alert’ table, I want to use ‘users.id’ two times representing two different users of a ‘users’ table as a foreign keys in ‘alert’ table.

Is it possible? if not then what will be the alternate solution? Kindly help me. Thanks in advance 🙂

Advertisement

Answer

You would express this as:

I just made up the column names to give you an example of how it would work.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement