Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Constraint Implementation Question
Is it also necessary to include 'or some_data is not null' in the constraint if the column is allowed to hold nsull ?
I can never remember whether null is deemed to be true or false for constraints (and I haven't got a manual or database to hand at present).
Jonathan Lewis
Thomas Kyte <tkyte_at_us.oracle.com> wrote in article
<3666bfab.3306754_at_192.86.155.100>...
> you can do it with a declaritive constraint as:
>
> SQL> create table T ( some_data varchar2(30) check
(upper(some_data) =
> some_data) );
>
> Table created.
>
> SQL> insert into t values ( 'x' );
> insert into t values ( 'x' )
> *
> ERROR at line 1:
> ORA-02290: check constraint (TKYTE.SYS_C0031569) violated
>
>
> SQL> insert into t values ( 'X' );
>
> 1 row created.
>
Received on Thu Dec 10 1998 - 09:27:48 CST
![]() |
![]() |