mysql如何设置一个字段只能是0或者1
[code="sql"] create table test(id int ,no enum('0','1'));[/code]
用check约束~
用Dxx23的方法,行否?
不过网上似乎说mysql不支持check约束,建议在前台控制。