Example: A table Keyed by Unique Name and Email Address with a column for Type The Type column can have Original, Work, Personal where you can have multiple work and personal emails but only 1 Original email I am using DB2 for i SQL and I want to constrain the data using UNIQUE or CHECK constraints but not sure how I can do this data set.
Scott scott@hotmail.com Original
Scott scott@gmail.com Personal
Scott scott@live.com Personal
Scott scott@NBC.com Work
Scott scott@ABC.com Work
Scott scott@yahoo.com Original
I want to identify that I cant have yahoo as Original if I already have hotmail as original. the rest are valid.
Let me know if I need to add more.