HI ALL,
I CREATED A TABLE AND APPLIED CHECK CONSTRAINT USING IN AND LATER I AM ENTERING DATA WHY CHECK CONSTRAINT IS ACCEPTING ALL THE INSERT STATEMENTS.
CREATE TABLE TEST1(SNO INT,
NAME VARCHAR(20),
STATUS CHAR(1) CONSTRAINT CHK_1 CHECK (STATUS IN (NULL,'N','Y')) DEFAULT NULL)
INSERT INTO TEST1 VALUES(1,'ABC','')
INSERT INTO TEST1(SNO,NAME) VALUES(1,'ABC')
INSERT INTO TEST1(SNO,NAME,STATUS) VALUES (1,'ABC','T')
THANKS,
SAI