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: Oracle 10g - Putting a where clause on a column with a check constraint.

Re: Oracle 10g - Putting a where clause on a column with a check constraint.

From: Jon <jonathan.p.crawford_at_gmail.com>
Date: 22 Mar 2006 13:58:28 -0800
Message-ID: <1143064708.462294.278270@z34g2000cwc.googlegroups.com>


So I just tried this. And everything worked fine.

Apperently just adding N infront of the values in the check constraint made oracle happy.

create table jon5
(
AAA NVARCHAR2(1),
BBB NVARCHAR2(10),
CONSTRAINT CC_AAA CHECK(AAA IN(N'N',N'Y')), CONSTRAINT CC_BBB CHECK(BBB IN(N'Happy',N'Sad',N'Angry')) );

insert into jon5 values('Y','Happy');
insert into jon5 values('Y','Sad');
insert into jon5 values('Y','Angry');
insert into jon5 values('N','Sad');
Received on Wed Mar 22 2006 - 15:58:28 CST

Original text of this message

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