官方文档解释---The CHECK clause is parsed but ignored by all storage engines.
The CHECK clause is parsed but ignored by all storage engines.
两种方法解决
字段少用枚举 sex enum(‘1‘,‘0‘) default ‘1‘;
多的话触发器
mysql中check无效
原文:https://www.cnblogs.com/Dfrank/p/11823582.html