开发者

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)
)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜