regarding check constraint
KarteekJul 5 2012 — edited Jul 6 2012Hi everyone,
i have a table for example :
CREATE TABLE RMD_2
(
"RMD_ID" NUMBER(10,0) NOT NULL ENABLE,
"ABB" VARCHAR2(16 BYTE),
"ACT_IND" VARCHAR2(1 BYTE) NOT NULL DISABLE,
CONSTRAINT "RMD_2_C1" CHECK (act_ind IN ('Y', 'N')) ENABLE
)
for column ACT_IND their is a check constraint RMD_2_C1
it should only accept either Y or N.
but, when ever i am inserting other values other than Y or N it is accepting
it should not accept and it should have to give error message ORA-02293- : check constraint violated.
but it is not happening,it is accepting all other values even NULL value also.
my requirement is this column should only accept either Y or N and it should not accept other values.
please needhelpful.
Edited by: karteek on Jul 5, 2012 7:00 AM