当前位置:网站首页>Fifteen. Actual combat - MySQL database building table character set and collation
Fifteen. Actual combat - MySQL database building table character set and collation
2022-08-05 03:25:00 【Isn't this more popular than bloggers?】
1. Character set and collation
Character Set
When the database needs to adapt to different languages, it needs to have different character sets. If the character set is not specified, then the default character set of the database will be used. Each character set has its own default collation rules.The default character set of mysql is utf8, and the default collation is utf8_general_ci.Generally, we will also choose the character set as utf-8
Collation
Each character set will have its own collation, and the collation suffix is generally divided into cs, ci
- cs: case sensitive is translated as case sensitive
- ci: case insensitive is translated as case insensitive
Example:
select * from test where column1 like "A%"If we choose cs, then we will choose the beginning of A
If we choose ci, then we will choose the beginning of a or A
In the case of uncertain case, we usually choose ci, which is not sensitive and can choose a little more range
Original: https://blog.csdn.net/aduoge/article/details/116501560
2. The difference between utf8 and utf8mb4:
MySQL added this utf8mb4 encoding after 5.5.3. utf8mb4 is completely backward compatible with utf8. In order to save space, it is usually enough to use utf8.
Original: https://www.fujieace.com/mysql/utf8-utf8mb4.html
边栏推荐
- Dameng 8 database export and import
- Countdown to 2 days|Cloud native Meetup Guangzhou Station, waiting for you!
- Syntax basics (variables, input and output, expressions and sequential statements)
- sql怎么找字段里所有数据为空的字段
- 用CH341A烧录外挂Flash (W25Q16JV)
- 【滤波跟踪】基于matlab无迹卡尔曼滤波惯性导航+DVL组合导航【含Matlab源码 2019期】
- Thinking (88): Use protobuf custom options for multi-version management of data
- High Item 02 Information System Project Management Fundamentals
- 2022.8.4-----leetcode.1403
- The usage of try...catch and finally in js
猜你喜欢

Ice Scorpion V4.0 attack, security dog products can be fully detected

Never put off till tomorrow what you can put - house lease management system based on the SSM

On governance and innovation, the 2022 OpenAtom Global Open Source Summit OpenAnolis sub-forum came to a successful conclusion

2022 High-level installation, maintenance, and removal of exam questions mock exam question bank and online mock exam

ASP.NET应用程序--Hello World

静态方法获取配置文件数据

如何在WordPress中添加特定类别的小工具

告白数字化转型时代,时速云镌刻价值新起点
![[Solved] Unity Coroutine coroutine is not executed effectively](/img/ab/035ef004a561fb98d3dd1d7d8b5618.png)
[Solved] Unity Coroutine coroutine is not executed effectively

Details such as compiling pretreatment
随机推荐
You may use special comments to disable some warnings. 报错解决的三种方式
QT: The Magical QVarient
包拉链不可用,但是是被另一个包。
Bubble Sort and Quick Sort
How to solve the error cannot update secondary snapshot during a parallel operation when the PostgreSQL database uses navicat to open the table structure?
Burp installation and proxy settings
语法基础(变量、输入输出、表达式与顺序语句)
惨遭打脸:字节某部门竟有这么多测试员
Intersection of Boolean Operations in SuperMap iDesktop.Net - Repairing Complex Models with Topological Errors
Call Alibaba Cloud oss and sms services
leetcode - symmetric binary tree
2022 High-level installation, maintenance, and removal of exam questions mock exam question bank and online mock exam
使用二维码传输文件的小工具 - QFileTrans 1.2.0.1
龙蜥社区第二届理事大会圆满召开!理事换届选举、4 位特约顾问加入
[Storage] Dawning Storage DS800-G35 ISCSI maps each LUN to the server
2022高处安装、维护、拆除考试题模拟考试题库及在线模拟考试
2022-08-04 The sixth group, hidden from spring, study notes
public static <T> List<T> asList(T... a) 原型是怎么回事?
ffmpeg -sources分析
毕设-基于SSM房屋租赁管理系统