mysql中check无效

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

两种方法解决

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

多的话触发器

猜你喜欢

转载自www.cnblogs.com/Dfrank/p/11823582.html