当前位置:网站首页>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
边栏推荐
- [Qixi Festival] Romantic Tanabata, code teaser.Turn love into a gorgeous three-dimensional scene and surprise her (him)!(send code)
- 调用阿里云oss和sms服务
- ffmpeg -sources分析
- How to Add Category-Specific Widgets in WordPress
- How Jin Cang database correctness verification platform installation file
- .NET Application -- Helloworld (C#)
- 2022-08-04 The sixth group, hidden from spring, study notes
- How to solve the error cannot update secondary snapshot during a parallel operation when the PostgreSQL database uses navicat to open the table structure?
- MRTK3 develops Hololens application - gesture drag, rotate, zoom object implementation
- Syntax basics (variables, input and output, expressions and sequential statement completion)
猜你喜欢

Step by step how to perform data risk assessment

2022-08-04 第六小组 瞒春 学习笔记

21 Days Learning Challenge (2) Use of Graphical Device Trees

Everyone in China said data, you need to focus on core characteristic is what?

tree table lookup

通过模拟Vite一起深入其工作原理

YYGH-13-Customer Service Center

The second council meeting of the Dragon Lizard Community was successfully held!Director general election, 4 special consultants joined

CPDA|How Operators Learn Data Analysis (SQL) from Negative Foundations

Details such as compiling pretreatment
随机推荐
队列题目:最近的请求次数
【已解决】Unity Coroutinue 协程未有效执行的问题
shell脚本:for循环与while循环
QT language file production
Slapped in the face: there are so many testers in a certain department of byte
You may use special comments to disable some warnings. Three ways to report errors
presto启动成功后出现2022-08-04T17:50:58.296+0800 ERROR Announcer-3 io.airlift.discovery.client.Announcer
【 genius_platform software platform development 】 : seventy-six vs the preprocessor definitions written cow force!!!!!!!!!!(in the other groups conding personnel told so cow force configuration to can
通过模拟Vite一起深入其工作原理
ffmpeg 像素格式基础知识
undo problem
运维监控系统之Open-Falcon
Why is the pca component not associated
ffmpeg pixel format basics
After the large pixel panorama is completed, what are the promotion methods?
【软件测试】自动化测试之unittest框架
Distributed systems revisited: there will never be a perfect consistency scheme...
ffmpeg 枚举decoders, encoders 分析
数学-求和符号的性质
Matlab drawing 3