当前位置:网站首页>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
边栏推荐
- Flink 1.15.1 Cluster Construction (StandaloneSession)
- ffmpeg 枚举decoders, encoders 分析
- 21天学习挑战赛(2)图解设备树的使用
- 冒泡排序与快速排序
- [Storage] Dawning Storage DS800-G35 ISCSI maps each LUN to the server
- Call Alibaba Cloud oss and sms services
- 使用二维码传输文件的小工具 - QFileTrans 1.2.0.1
- Step by step how to perform data risk assessment
- QStyle platform style
- ASP.NET应用程序--Hello World
猜你喜欢
Leading the highland of digital medicine, Zhongshan Hospital explores to create a "new paradigm" for future hospitals
How to Add Category-Specific Widgets in WordPress
沃谈小知识 |“远程透传”那点事儿
通过模拟Vite一起深入其工作原理
Intersection of Boolean Operations in SuperMap iDesktop.Net - Repairing Complex Models with Topological Errors
word column notes
静态方法获取配置文件数据
The second council meeting of the Dragon Lizard Community was successfully held!Director general election, 4 special consultants joined
Simple description of linked list and simple implementation of code
The linear table lookup
随机推荐
Native js realizes the effect of selecting and canceling all the multi-select boxes
Never put off till tomorrow what you can put - house lease management system based on the SSM
(11) Metaclass
From "useable" to "easy to use", domestic software is self-controllable and continues to advance
rpc-remote procedure call demo
21 Days Learning Challenge (2) Use of Graphical Device Trees
Talking about data security governance and privacy computing
The second council meeting of the Dragon Lizard Community was successfully held!Director general election, 4 special consultants joined
Dameng 8 database export and import
Tencent Cloud [Hiflow] New Era Automation Tool
ffmpeg 像素格式基础知识
从“能用”到“好用” 国产软件自主可控持续推进
dmp (dump) dump file
Use @Mapper to query the partition status of oracle and report an error
【Daily Training】1403. Minimum Subsequence in Non-Increasing Order
leetcode - a subtree of another tree
The Tanabata copywriting you want has been sorted out for you!
You may use special comments to disable some warnings. Three ways to report errors
.NET应用程序--Helloworld(C#)
龙蜥社区第二届理事大会圆满召开!理事换届选举、4 位特约顾问加入