mysql中check无效

官方文档解释---The CHECK clause is parsed but ignored by all storage engines.

两种方法解决

字段少用枚举  sex enum('1','0') default '1';

多的话触发器

posted @ 2019-11-08 22:06  DFrank001  阅读(387)  评论(0编辑  收藏  举报