标签:
mysql> alter table member add constraint score check(score>=0 and score<=100);
Query OK, 0 rows affected (0.04 sec)
Records: 0 Duplicates: 0 Warnings: 0
限定字段取值范围
mysql> alter table member add sex enum(‘1‘,‘2‘) not null;
mysql> alter table member add constraint score check(score>=0 and score<=100);
Query OK, 0 rows affected (0.04 sec)
Records: 0 Duplicates: 0 Warnings: 0
标签:
原文地址:http://www.cnblogs.com/guxuanqing/p/4945689.html