Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle 10g - Putting a where clause on a column with a check constraint.
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