to simplify this let take that table:
table1
-------------
id unique primary int
myVal1 int null (fk)
myVal2 int null (fk)
myData int not null
what would be the best way to create a constrain on this table so only one value can be filled?
these would work:
insert into table1 (myval1,myData) values (1,234)
insert into table1 (myval2,myData) values (1,123)
these would not work:
insert into table1 (myData) values (234)
insert into table1 (myVal1,myval2,myData) values (1,2,123)