码迷,mamicode.com
首页 > 数据库 > 详细

mysql_2

时间:2015-11-07 17:42:20      阅读:217      评论:0      收藏:0      [点我收藏+]

标签:

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

mysql_2

标签:

原文地址:http://www.cnblogs.com/guxuanqing/p/4945689.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!