mysql枚举类型
1.使用枚举类型的好处
对数据进限定,增加其安全性
查询速度更快
操作更加方便
2.枚举类型的应用
创建 test 数据库
create database test charset=utf8;
进入 test 数据库并创建 test 表
use test;
create table test( name enum('James','Curry')) charset=utf8;
查看字段类型
desc test;
显示如下
+-------+---------------------
原创
2021-02-10 10:15:23 ·
1226 阅读 ·
1 评论