当前位置:网站首页>十五. 实战——mysql建库建表 字符集 和 排序规则
十五. 实战——mysql建库建表 字符集 和 排序规则
2022-08-05 03:07:00 【这不比博人传燃?】
1. 字符集和排序规则
字符集
当数据库需要适应不同的语言就需要有不同的字符集,如果不指定字符集的话,那么就会使用数据库的默认的字符集,每种字符集都有自己默认的排序规则。mysql默认字符集为utf8,默认排序规则为utf8_general_ci。一般我们也会选择字符集为utf-8
排序规则
每一种字符集都会有自己的排序规则(collation),排序规则后缀一般分为cs, ci
- cs: case sensitive 翻译过来就是对大小写敏感
- ci: case insensitive 翻译过来就是对大小写不敏感
举例:
select * from test where column1 like "A%"
如果我们选择cs,这时就会选择A开头的
如果我们选择ci,这时就会选择a或者A开头的
在不确定大小写的情况,我们通常选择ci,要求不敏感,可以选择的范围多一点
原文:https://blog.csdn.net/aduoge/article/details/116501560
2. utf8和utf8mb4的区别:
MySQL在5.5.3之后增加了这个utf8mb4的编码,utf8mb4完全向下兼容utf8,为了节省空间,一般情况下使用utf8也就够了。
原文:https://www.fujieace.com/mysql/utf8-utf8mb4.html
边栏推荐
- In 2022, you still can't "low code"?Data science can also play with Low-Code!
- Matlab画图3
- Simple description of linked list and simple implementation of code
- Cloud Native (32) | Introduction to Platform Storage System in Kubernetes
- 数据增强Mixup原理与代码解读
- 高项 02 信息系统项目管理基础
- 1873. 计算特殊奖金
- ASP.NET application--Hello World
- 【滤波跟踪】基于matlab无迹卡尔曼滤波惯性导航+DVL组合导航【含Matlab源码 2019期】
- mysql can't Execute, please solve it
猜你喜欢
![[Filter tracking] based on matlab unscented Kalman filter inertial navigation + DVL combined navigation [including Matlab source code 2019]](/img/c9/fff226b6d33a773b59a0314a99a788.png)
[Filter tracking] based on matlab unscented Kalman filter inertial navigation + DVL combined navigation [including Matlab source code 2019]

ASP.NET应用程序--Hello World

【七夕节】浪漫七夕,代码传情。将爱意变成绚烂的立体场景,给她(他)一个惊喜!(送代码)
![[Qixi Festival] Romantic Tanabata, code teaser.Turn love into a gorgeous three-dimensional scene and surprise her (him)!(send code)](/img/10/dafea90158adf9d43c4f025414fef7.png)
[Qixi Festival] Romantic Tanabata, code teaser.Turn love into a gorgeous three-dimensional scene and surprise her (him)!(send code)

21天学习挑战赛(2)图解设备树的使用

The Tanabata copywriting you want has been sorted out for you!

数据增强Mixup原理与代码解读

ASP.NET application--Hello World

沃谈小知识 |“远程透传”那点事儿

QT语言文件制作
随机推荐
语法基础(变量、输入输出、表达式与顺序语句)
沃谈小知识 |“远程透传”那点事儿
Bubble Sort and Quick Sort
Gantt chart is here, project management artifact, template is used directly
dmp(dump)转储文件
How to Add Category-Specific Widgets in WordPress
语法基础(变量、输入输出、表达式与顺序语句)
Multithreading (2)
ASP.NET application--Hello World
Step by step how to perform data risk assessment
Beyond YOLO5-Face | YOLO-FaceV2 officially open source Trick+ academic point full
QT: The Magical QVarient
IJCAI2022 | DictBert: Pre-trained Language Models with Contrastive Learning for Dictionary Description Knowledge Augmentation
Never put off till tomorrow what you can put - house lease management system based on the SSM
The problem of lack of dynamic library "libtinfo.so.5" in ksql application under UOS system
Matlab画图3
The 22-07-31 weeks summary
大像素全景制作完成后,推广方式有哪些?
Question about #sql shell#, how to solve it?
Lexicon - the maximum depth of a binary tree