Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Constraint Implementation Question

Re: Constraint Implementation Question

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 10 Dec 1998 15:27:48 GMT
Message-ID: <01be2450$d2dd3a90$0300a8c0@WORKSTATION>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US