create table finecms_set(id int not null auto_increment,
work_option SET('','dba','SA','Coding Engineer','Javascript','NA','QA','other') not null,
work_city set('shanghai','beijing','jilin','liaoning','heilongjiang','sy','other')not null default 'sy',
primary KEY(id));
在创建表时候,如果使用set可以限定字段的内容范围,也就是所必须从字段设定的范围添加和修改,其他set以外的内容无法写入数据库,也无法修改。