mysql属性怎么设置中文

1857
2020/12/3 17:13:31
栏目: 云计算
开发者测试专用服务器限时活动,0元免费领,库存有限,领完即止! 点击查看>>

mysql属性怎么设置中文

mysql中设置中文属性的方法

mysql设置中文属性,需要在表中使用utf8编码

如:

create table test (

        id     int auto_increment,

        title  text,

        content  text,

        posted_on  datetime,

        primary key (id)

) character set = utf8;

当数据表不支持中文属性时,使用以下语句对表进行修改即可

alter table 表名 convert to character set utf8;

辰迅云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

推荐阅读: mysql中datediff函数有什么用