I am wondering if there is any way for me to check if a column has a value, if the value is XXXXX then another column must be in the list of (A,B,C). something like:
CREATE TABLE test (a CHAR(60),b CHAR(60),Check (IF a == 'test' THEN b in ('a','b','c')));
In other words, in
testrows,bmust be in the list, while in non-testrows,bcan be anything.So for the check to succeed,
bmust be in the list, or the row must not be atestrow:Mathematically,
a → bis the same as¬a ∨ b.