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

Home -> Community -> Usenet -> c.d.o.server -> Re: Problem with Check Constraint using NVL

Re: Problem with Check Constraint using NVL

From: Tony <andrewst_at_onetel.net.uk>
Date: 6 Feb 2004 02:20:16 -0800
Message-ID: <c0e3f26e.0402060220.411f1798@posting.google.com>


dany.morin_at_mobilair.qc.ca (Dany morin) wrote in message news:<fe2795e4.0402051200.65be11d6_at_posting.google.com>...
> I know that the second declaration of this constraint works well.
> However, I want to understant why the first one doesn't work.
>
> ALTER TABLE x ADD CONSTRAINT ck_x_c3 CHECK ((code1 IS NULL AND type1
> IS NULL) OR (code1 IS NOT NULL AND NVL(type1 ,'-1') IN
> ('1','2','3','4','N','U')));

Well it works for me. Please post an example of an insert or update that does not work. Received on Fri Feb 06 2004 - 04:20:16 CST

Original text of this message

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