Oracle null limitation

I have email and cellPhone attributes in the table, one of them can be zero and the other should not be zero, how can I make a restriction so that the two values ​​are not zero?

+3
source share
1 answer

Sort of:

CREATE TABLE mytable(   
   email varchar2(100), 
   cellphone varchar2(100),
   constraint null_check
   check (email is not null or cellphone is not null)
)
+10
source

All Articles