SHOW CHARACTER SET [LIKE 'pattern
' | WHEREexpr
]
The SHOW CHARACTER SET
statement shows all available character sets. SHOW CHARACTER SET
语句显示所有可用的字符集。The LIKE
clause, if present, indicates which character set names to match. LIKE
子句(如果存在)指示要匹配的字符集名称。The WHERE
clause can be given to select rows using more general conditions, as discussed in Section 26.8, “Extensions to SHOW Statements”. WHERE
子句可用于使用更一般的条件选择行,如第26.8节,“SHOW语句的扩展”所述。For example:例如:
mysql> SHOW CHARACTER SET LIKE 'latin%';
+---------+-----------------------------+-------------------+--------+
| Charset | Description | Default collation | Maxlen |
+---------+-----------------------------+-------------------+--------+
| latin1 | cp1252 West European | latin1_swedish_ci | 1 |
| latin2 | ISO 8859-2 Central European | latin2_general_ci | 1 |
| latin5 | ISO 8859-9 Turkish | latin5_turkish_ci | 1 |
| latin7 | ISO 8859-13 Baltic | latin7_general_ci | 1 |
+---------+-----------------------------+-------------------+--------+
SHOW CHARACTER SET
output has these columns:输出包含以下列:
Charset
The character set name.字符集名称。
Description
A description of the character set.字符集的描述。
Default collation
The default collation for the character set.字符集的默认排序规则。
Maxlen
The maximum number of bytes required to store one character.存储一个字符所需的最大字节数。
The filename
character set is for internal use only; consequently, SHOW CHARACTER SET
does not display it.filename
字符集仅供内部使用;因此,SHOW CHARACTER SET
不会显示它。
Character set information is also available from the 字符集信息也可从INFORMATION_SCHEMA
CHARACTER_SETS
table. INFORMATION_SCHEMA
CHARACTER_SETS
表中获得。See Section 26.3.4, “The INFORMATION_SCHEMA CHARACTER_SETS Table”.参见第26.3.4节,“信息模式字符集表”。