<small id='kPjLl'></small><noframes id='kPjLl'>

    1. <legend id='kPjLl'><style id='kPjLl'><dir id='kPjLl'><q id='kPjLl'></q></dir></style></legend>

          <bdo id='kPjLl'></bdo><ul id='kPjLl'></ul>
        <tfoot id='kPjLl'></tfoot>
        <i id='kPjLl'><tr id='kPjLl'><dt id='kPjLl'><q id='kPjLl'><span id='kPjLl'><b id='kPjLl'><form id='kPjLl'><ins id='kPjLl'></ins><ul id='kPjLl'></ul><sub id='kPjLl'></sub></form><legend id='kPjLl'></legend><bdo id='kPjLl'><pre id='kPjLl'><center id='kPjLl'></center></pre></bdo></b><th id='kPjLl'></th></span></q></dt></tr></i><div id='kPjLl'><tfoot id='kPjLl'></tfoot><dl id='kPjLl'><fieldset id='kPjLl'></fieldset></dl></div>

      1. 字符集和排序规则到底是什么意思?

        时间:2023-08-18
            <tbody id='GMIUb'></tbody>
            <bdo id='GMIUb'></bdo><ul id='GMIUb'></ul>
          • <legend id='GMIUb'><style id='GMIUb'><dir id='GMIUb'><q id='GMIUb'></q></dir></style></legend>

            <small id='GMIUb'></small><noframes id='GMIUb'>

              <tfoot id='GMIUb'></tfoot>
              <i id='GMIUb'><tr id='GMIUb'><dt id='GMIUb'><q id='GMIUb'><span id='GMIUb'><b id='GMIUb'><form id='GMIUb'><ins id='GMIUb'></ins><ul id='GMIUb'></ul><sub id='GMIUb'></sub></form><legend id='GMIUb'></legend><bdo id='GMIUb'><pre id='GMIUb'><center id='GMIUb'></center></pre></bdo></b><th id='GMIUb'></th></span></q></dt></tr></i><div id='GMIUb'><tfoot id='GMIUb'></tfoot><dl id='GMIUb'><fieldset id='GMIUb'></fieldset></dl></div>

                1. 本文介绍了字符集和排序规则到底是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我可以阅读 MySQL 文档,而且非常清楚.但是,如何决定使用哪个字符集?整理对哪些数据有影响?

                  I can read the MySQL documentation and it's pretty clear. But, how does one decide which character set to use? On what data does collation have an effect?

                  我要求解释这两者以及如何选择它们.

                  I'm asking for an explanation of the two and how to choose them.

                  推荐答案

                  来自 MySQL 文档:

                  字符集是一组符号和编码.collat​​ion 是一组比较字符的规则字符集.让我们做用一个例子区分清楚一个虚构的字符集.

                  A character set is a set of symbols and encodings. A collation is a set of rules for comparing characters in a character set. Let's make the distinction clear with an example of an imaginary character set.

                  假设我们有一个字母表四个字母:A"、B"、a"、b".我们给每个字母一个数字:'A' = 0,'B' = 1, 'a' = 2, 'b' = 3. 字母'A' 是一个符号,数字 0 是'A' 的编码,以及组合所有四个字母及其encodings 是一个字符集.

                  Suppose that we have an alphabet with four letters: 'A', 'B', 'a', 'b'. We give each letter a number: 'A' = 0, 'B' = 1, 'a' = 2, 'b' = 3. The letter 'A' is a symbol, the number 0 is the encoding for 'A', and the combination of all four letters and their encodings is a character set.

                  现在,假设我们要比较两个字符串值,A"和B".这最简单的方法是查看编码:0 代表A",1 代表'乙'.因为 0 小于 1,所以我们说A"小于B".现在,我们所拥有的刚刚完成的是对我们的字符集.整理是一个集合规则(在这种情况下只有一个规则):比较编码."我们称之为所有可能的排序规则中最简单的一个二进制整理.

                  Now, suppose that we want to compare two string values, 'A' and 'B'. The simplest way to do this is to look at the encodings: 0 for 'A' and 1 for 'B'. Because 0 is less than 1, we say 'A' is less than 'B'. Now, what we've just done is apply a collation to our character set. The collation is a set of rules (only one rule in this case): "compare the encodings." We call this simplest of all possible collations a binary collation.

                  但是如果我们想说小写和大写字母是相等的?那么我们将在至少有两条规则:(1)对待小写字母 'a' 和 'b' 作为相当于A"和B";(2) 那么比较编码.我们称之为不区分大小写的排序规则.它是比二进制复杂一点整理.

                  But what if we want to say that the lowercase and uppercase letters are equivalent? Then we would have at least two rules: (1) treat the lowercase letters 'a' and 'b' as equivalent to 'A' and 'B'; (2) then compare the encodings. We call this a case-insensitive collation. It's a little more complex than a binary collation.

                  在现实生活中,大多数字符集都有许多字符:不仅仅是A"和B"但是整个字母表,有时多个字母或东方文字具有数千个字符的系统,以及许多特殊符号和标点符号.在现实生活中,大多数排序规则有很多规则:不只是不区分大小写,但也口音不敏感(口音"是附加到字符的标记,如德语 'ö') 和多字符映射(例如ö"='OE' 在两个德语之一中排序规则).

                  In real life, most character sets have many characters: not just 'A' and 'B' but whole alphabets, sometimes multiple alphabets or eastern writing systems with thousands of characters, along with many special symbols and punctuation marks. Also in real life, most collations have many rules: not just case insensitivity but also accent insensitivity (an "accent" is a mark attached to a character as in German 'ö') and multiple-character mappings (such as the rule that 'ö' = 'OE' in one of the two German collations).

                  这篇关于字符集和排序规则到底是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:使用 SQL 查询查找最近的纬度/经度 下一篇:哪个最快?SELECT SQL_CALC_FOUND_ROWS FROM `table`,或 SE

                  相关文章

                  最新文章

                  <small id='2S0Ko'></small><noframes id='2S0Ko'>

                    <legend id='2S0Ko'><style id='2S0Ko'><dir id='2S0Ko'><q id='2S0Ko'></q></dir></style></legend><tfoot id='2S0Ko'></tfoot>
                    1. <i id='2S0Ko'><tr id='2S0Ko'><dt id='2S0Ko'><q id='2S0Ko'><span id='2S0Ko'><b id='2S0Ko'><form id='2S0Ko'><ins id='2S0Ko'></ins><ul id='2S0Ko'></ul><sub id='2S0Ko'></sub></form><legend id='2S0Ko'></legend><bdo id='2S0Ko'><pre id='2S0Ko'><center id='2S0Ko'></center></pre></bdo></b><th id='2S0Ko'></th></span></q></dt></tr></i><div id='2S0Ko'><tfoot id='2S0Ko'></tfoot><dl id='2S0Ko'><fieldset id='2S0Ko'></fieldset></dl></div>

                      • <bdo id='2S0Ko'></bdo><ul id='2S0Ko'></ul>