I have two tables –> Variables (id, name) and Variable_Entries (id, var_id, value).
I want each variable to have a unique set of entries. If I make the value entry unique then a different variable won’t be able to have that same value which is not right.
Is there some way to make the value column unique for identical var_id’s?
Yes:
Now you have a unique constraint across var_id and value together. In other words, no occurrence of var_id and value can appear more than once.