• SHOW CHARACTER SET
    • 语法图
    • 示例
    • MySQL 兼容性
    • 另请参阅

    SHOW CHARACTER SET

    SHOW CHARACTER SET 语句提供 TiDB 中可用字符集的静态列表。此列表不反映当前连接或用户的任何属性。

    语法图

    ShowStmt:

    ShowStmt

    ShowTargetFilterable:

    ShowTargetFilterable

    CharsetKw:

    CharsetKw

    示例

    1. mysql> SHOW CHARACTER SET;
    2. +---------+---------------+-------------------+--------+
    3. | Charset | Description | Default collation | Maxlen |
    4. +---------+---------------+-------------------+--------+
    5. | utf8 | UTF-8 Unicode | utf8_bin | 3 |
    6. | utf8mb4 | UTF-8 Unicode | utf8mb4_bin | 4 |
    7. | ascii | US ASCII | ascii_bin | 1 |
    8. | latin1 | Latin1 | latin1_bin | 1 |
    9. | binary | binary | binary | 1 |
    10. +---------+---------------+-------------------+--------+
    11. 5 rows in set (0.00 sec)

    MySQL 兼容性

    SHOW CHARACTER SET 语句与 MySQL 完全兼容。如有任何兼容性差异,请在 GitHub 上提交 issue。

    另请参阅

    • SHOW COLLATION