I have following table:
CardsTable:
-------
CardID int
PersonID int
Number int
-----------------------
CardID PersonID Number
1 10 22
2 10 22
3 11 24
4 11 24
5 10 22
Number field
should be unique for all personID
that have the same IDs.
Following example is invalid:
CardID PersonID CardID
6 11 22
7 12 22
8 12 24
How to use conditional unique constraint to implement it?