I have two tables:
T1(A,B)
where
create table T1(
A char(2) NOT NULL primary key check(T1.A not in T2.B),
B char(2) unique
);
T2(C,B)
where
create table T2(
C number(2) primary key,
B char(2) unique references T1 check(T1.B not in T1.A)
);
Here, T2.B
references T1.A
.
My question is that how can I put a check constraint to T1.A
and T1.B
such that values allowed by T1.A
are different from those allowed by T2.B
?