Oracle null constraint
I have an email and cellPhone attrib开发者_StackOverflow社区utes in a table, one of them can be null and the other must not be null, how can I make constraint to prevent two values to be null?
Something like:
CREATE TABLE mytable(
email varchar2(100),
cellphone varchar2(100),
constraint null_check
check (email is not null or cellphone is not null)
)
精彩评论