alter table Salary
add CONSTRAINT check__salary CHECK
( CASE WHEN sex = '2' THEN CASE WHEN salary > 1000 THEN 1 ELSE 0 END
ELSE 1 END =1 )_**_**
为什么上面语句最后结束的时候(end 后面)要加上 “=1”,否则会提示下面的错误信息:
An expression of non-boolean type specified in a context where a condition is expected