Globalization and Localization

When discussing multiple languages and characters sets, you will run into the following important terms:

  • Character sets are collections of letters and symbols.

  • Encodings are the internal representations of the members of a character set.

  • Collations are the instructions that dictate how characters are to be compared.

关于字符集和排序规则的几点注意事项:

  • 在常规操作,诸如 SELECT、INSERT 的时候,我们无须担心字符集的问题,因为字符集、排序顺序是在服务器、数据库、表的层次上被设置的。这些东西通常在你安装数据库的时候就已经配置好了。
  • 如果创建表的时候没有指明字符集,数据库将自动给你配置默认的字符集。
  • 甚至可以为指定的列专门设置字符集。
  • 在排序、GROUP BY、使用聚集函数等很多场景都可以指定特定的排序规则(COLLATE )

几个顾名思义的操作:

-- 显示当前的字符集和排序规则
SHOW VARIABLES LIKE 'character%';
SHOW VARIABLES LIKE 'collation%';
-- 显示所有可用的字符集和排序规则
SHOW CHARACTER SET;
SHOW COLLATION;

MySQL Crash Course #19# Chapter 27. Globalization and Localization的更多相关文章

  1. MySQL Crash Course #10# Chapter 19. Inserting Data

    INDEX BAD EXAMPLE Improving Overall Performance Inserting Multiple Rows INSTEAD OF Inserting a Singl ...

  2. MySQL Crash Course #13# Chapter 21. Creating and Manipulating Tables

    之前 manipulate 表里的数据,现在则是 manipulate 表本身. INDEX 创建多列构成的主键 自动增长的规定 查看上一次插入的自增 id 尽量用默认值替代 NULL 外键不可以跨引 ...

  3. MySQL Crash Course #11# Chapter 20. Updating and Deleting Data

    INDEX Updating Data The IGNORE Keyword Deleting Data Faster Deletes Guidelines for Updating and Dele ...

  4. MySQL Crash Course #06# Chapter 13. 14 GROUP BY. 子查询

    索引 理解 GROUP BY 过滤数据 vs. 过滤分组 GROUP BY 与 ORDER BY 之不成文的规定 子查询 vs. 联表查询 相关子查询和不相关子查询. 增量构造复杂查询 Always ...

  5. MySQL Crash Course #04# Chapter 7. 8 AND. OR. IN. NOT. LIKE

    索引 AND. OR 运算顺序 IN Operator VS. OR NOT 在 MySQL 中的表现 LIKE 之注意事项 运用通配符的技巧 Understanding Order of Evalu ...

  6. MySQL Crash Course #21# Chapter 29.30. Database Maintenance & Improving Performance

    终于结束这本书了,最后两章的内容在官方文档中都有详细介绍,简单过一遍.. 首先是数据备份,最简单直接的就是用 mysql 的内置工具 mysqldump MySQL 8.0 Reference Man ...

  7. MySQL Crash Course #20# Chapter 28. Managing Security

    限制用户的操作权限并不是怕有人恶意搞破坏,而是为了减少失误操作的可能性. 详细文档:https://dev.mysql.com/doc/refman/8.0/en/user-account-manag ...

  8. MySQL Crash Course #18# Chapter 26. Managing Transaction Processing

    InnoDB 支持 transaction ,MyISAM 不支持. 索引: Changing the Default Commit Behavior SAVEPOINT 与 ROLLBACK TO ...

  9. MySQL Crash Course #17# Chapter 25. 触发器(Trigger)

    推荐看这篇mysql 利用触发器(Trigger)让代码更简单 以及 23.3.1 Trigger Syntax and Examples 感觉有点像 Spring 里的 AOP 我们为什么需要触发器 ...

随机推荐

  1. Java-01-问题解答

    问题一:Java类文件是否只能有一个公有类? 1测试代码: //信1603 李敦岳 20163520 //测试Java是否只能有一个公有类 //2017.10.2 public class Test ...

  2. Oracle之RMAN备份恢复1-基础篇

    1,rman的作用与体系架构 1.1 什么是rman rman(recovery manager)是oracle8i以后dba的一重要工具一般位于$oracle_home/bin目录下,主要用来备份, ...

  3. easyui treegrid idField 所在属性中值有花括号(如Guid)当有鼠标事件时会报错,行记录一下

    easyui treegrid idField 所在属性中值有花括号(如Guid)当有鼠标事件时会报错,行记录一下

  4. poj3417Network【LCA】【树形DP】

    Yixght is a manager of the company called SzqNetwork(SN). Now she's very worried because she has jus ...

  5. Asp.net中的web.config配置

    目录 Asp.net中的web.config配置... 1 一. 配置文件保存位置... 2 二. 配置文件加载顺序... 2 三. 配置文件节点介绍... 3 1. . 3 2. . 5 3. . ...

  6. 【紫书】【重要】Not so Mobile UVA - 839 递归得漂亮

    题意:判断某个天平是否平衡,输入以递归方式给出. 题解:递归着输入,顺便将当前质量作为 &参数 维护一下,顺便再把是否平衡作为返回值传回去. 坑:最后一行不能多回车 附:天秀代码 #defin ...

  7. Elasticsearch 基础理论 & 配置调优

    一.简介 ElasticSearch是一个基于Lucene的搜索服务器.它提供了一个分布式多用户能力的全文搜索引擎,基于RESTful web接口.Elasticsearch是用Java开发的,并作为 ...

  8. 使用Intel IPT技术保护您的帐号安全

    使用Intel IPT技术保护您的帐号安全

  9. Python爬虫实例(六)多进程下载金庸网小说

    目标任务:使用多进程下载金庸网各个版本(旧版.修订版.新修版)的小说 代码如下: # -*- coding: utf-8 -*- import requests from lxml import et ...

  10. 带分数dfs+剪枝优化

    #include<iostream>#include<cstdio>#include<cstdlib>#include<ctime>using name ...