SHOW CHARACTER SET

z
b
y
T
r

This statement provides a static list of available character sets in TiDB. The output does not reflect any attributes of the current connection or user.

Synopsis

ShowCharsetStmt:

ShowCharsetStmt

CharsetKw:

CharsetKw

Examples

SHOW CHARACTER SET;
+---------+-------------------------------------+-------------------+--------+ | Charset | Description | Default collation | Maxlen | +---------+-------------------------------------+-------------------+--------+ | ascii | US ASCII | ascii_bin | 1 | | binary | binary | binary | 1 | | gbk | Chinese Internal Code Specification | gbk_chinese_ci | 2 | | latin1 | Latin1 | latin1_bin | 1 | | utf8 | UTF-8 Unicode | utf8_bin | 3 | | utf8mb4 | UTF-8 Unicode | utf8mb4_bin | 4 | +---------+-------------------------------------+-------------------+--------+ 6 rows in set (0.00 sec)

MySQL compatibility

The usage of this statement is understood to be fully compatible with MySQL. However, charsets in TiDB may have different default collations compared with MySQL. For details, refer to Compatibility with MySQL. Any other compatibility differences should be reported via an issue on GitHub.

See also

Was this page helpful?