13.7.7.3 SHOW CHARACTER SET Statement语句

SHOW CHARACTER SET
    [LIKE 'pattern' | WHERE expr]

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:输出包含以下列:

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节,“信息模式字符集表”