文档首页
MySQL 8.4 参考手册
8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 63%

28.3.6 INFORMATION_SCHEMA 排序规则表28.3.6 The INFORMATION_SCHEMA COLLATIONS Table

COLLATIONS 表提供有关每个字符集的排序规则的信息。The COLLATIONS table provides information about collations for each character set.

COLLATIONS 表具有以下列:The COLLATIONS table has these columns:

  • COLLATION_NAME

    排序规则名称。The collation name.

  • CHARACTER_SET_NAME

    与该排序规则相关联的字符集名称。The name of the character set with which the collation is associated.

  • ID

    排序规则 ID。The collation ID.

  • IS_DEFAULT

    该排序规则是否为其字符集的默认排序规则。Whether the collation is the default for its character set.

  • IS_COMPILED

    字符集是否已编译到服务器中。Whether the character set is compiled into the server.

  • SORTLEN

    这与按该字符集表示的字符串排序所需的内存量相关。This is related to the amount of memory required to sort strings expressed in the character set.

  • PAD_ATTRIBUTE

    排序填充属性,可以是 NO PAD 或 PAD SPACE。该属性会影响字符串比较中尾随空格是否重要;参见 比较中的尾随空格处理。The collation pad attribute, either NO PAD or PAD SPACE. This attribute affects whether trailing spaces are significant in string comparisons; see Trailing Space Handling in Comparisons.

注意事项Notes

排序信息也可以通过SHOW COLLATION语句获取。参见第 15.7.7.5 节,“SHOW COLLATION 语句”。以下语句是等效的:Collation information is also available from the SHOW COLLATION statement. See Section 15.7.7.5, “SHOW COLLATION Statement”. The following statements are equivalent:

SELECT COLLATION_NAME FROM INFORMATION_SCHEMA.COLLATIONS
  [WHERE COLLATION_NAME LIKE 'wild']

SHOW COLLATION
  [LIKE 'wild']