I have a table that defines a rule between two options:
CREATE TABLE VARIANTCOMBINATIONRULE ( VARRECID0 NUMBER(10) NOT NULL, VARRECID1 NUMBER(10) NOT NULL, RULE NUMBER ); ALTER TABLE VARIANTCOMBINATIONRULE ADD ( CONSTRAINT VARIANTCOMBINATIONRULE_PK PRIMARY KEY (VARRECID0, VARRECID1));
How to create a restriction prohibiting "reverse pairs"? At the same time, I mean that if there is an entry for options 12 and 14, you should not allow a new entry for a pair with the opposite (14 and 12).
source share