1、错误描述

alter table info add constraint ck_info_gender
check(stu_sex='男' or stu_sex='女')

ORA-00904: "STU_SEX": 标识符无效


2、错误原因

SQL> alter table info add constraint ck_info_gender
2 check(stu_sex='男' or stu_sex='女');


3、解决办法

    是由于check这个函数不存在,即使在里面输入了参数,也会报错;所以,添加check函数