作用与分类:
枚举enum,多选一个
集合set,多选多
测试
create table teacher(
id int,
name char(16),
sex enum('male','female','others'),
hobbies set('play','read','music','piao') #set集合多选多 要选多个的时候要用逗号隔开
);
如:
insert into teacher values(2,'alex','others','piao,play,read');#这就是选择了制作的表中的枚举和集合的例子,
集合是多选的就用了逗号隔开