i have a table with several columns. there is a pair of columns in the table for which i want to define a check constraint. i want this constraint to force that only one of the two columns can be not null in one record, or they can both be null. so, the following situations would be allowed:
and this situation wouldn't:
is there a way to create this restraint? if so, how?