I have two tables:
Country : has ID, Name
State : has ID, Name, CountryID
I defined Country.Name as unique.
I also want to define State.Name as unique per country – i.e. I can’t just define it as unique because two countries may have the same state. But for one country, every state is unique.
How can I do this?
Try to define
UNIQUEfor both columnsNameandCountryIDas below: