Proofreading set
In certain character set, can be compared with each other in order to make the character, so that characters and character to form a closed
collection system, called calibration set.
For example, in a ASCII and B, and a case-sensitive if a> B, does not distinguish if a <B;
different characters have different collations, naming convention: names its associated character set begins, the package typically
comprises a language name, and ends with _ci, _cs or _bin.
_ci: case-insensitive
_cs: case-sensitive
_bin: binary collation two yuan, direct comparison character code, can be considered to distinguish between large
lowercase character set as 'A' and 'a' is clearly different coding.
/* 数据库默认的排序方式,是升序 */
create table t1(
str char(1)
) charset=utf8mb4 collate=utf8mb4_general_ci; --
_general_ci 后缀的都是不区分大小写的
create table t2(
三、MySQL的数据类型
1. 整型
一个无符号数一定是非负数
str char(1)
) charset=utf8mb4 collate=utf8mb4_bin; -- 看到后缀边是_bin的
都是区分大小的
/*
Linux中Mysql是区分大小的
需要自己去配置
vim /etc/mysql/my.cnf
找到[mysqld]
1是不区分大小写,0是区分大小写
*/
lower_case_table_names=1
show character set; -- 查看字符集 和 校对集
show collation; -- 显示所有的校对集