Suppose a table called
Employee
ID number, name varchar(24 char), address varchar2(100 char), alternateAddress(100 char), sex varchar2(10 char)
Now I want to put a restriction so that both addresses and alternateAddress cannot be null. ie the following cases are possible:
- The address is null and alternateAddress is not null.
- alternateAddress is null and the address is not null
- alternateAddress is not null and the address is not null.
But it cannot happen that any record in the Employee table inserted with alternateAddress and the address is null
source share