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, eitherNO PADorPAD 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']