Here is my table (EMP)
mysql> select * from EMP;
I want to Use BETWEEN Operator in the Check statement for SAL attribute.
alter table EMP add check(SAL between 50000 and 100000);
I have insert a SAL value that violates the BETWEEN constraint to check whether my query works correctly or not.
insert into EMP values('2134','ARUN','TESTER','NO','1998-08-22','M',20000,2500,03); //I gave SAL as 20000 which is invalid in my case.
Instead of showing error, it accepts the invalid value!
How to solve this?