Sign InTry Free

COLLATIONS

The COLLATIONS table provides a list of collations that correspond to character sets in the CHARACTER_SETS table. Currently, this table is included only for compatibility with MySQL.

USE information_schema; DESC collations;
+--------------------+-------------+------+------+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------------+-------------+------+------+---------+-------+ | COLLATION_NAME | varchar(32) | YES | | NULL | | | CHARACTER_SET_NAME | varchar(32) | YES | | NULL | | | ID | bigint(11) | YES | | NULL | | | IS_DEFAULT | varchar(3) | YES | | NULL | | | IS_COMPILED | varchar(3) | YES | | NULL | | | SORTLEN | bigint(3) | YES | | NULL | | +--------------------+-------------+------+------+---------+-------+ 6 rows in set (0.00 sec)
SELECT * FROM collations WHERE character_set_name='utf8mb4';
+--------------------+--------------------+------+------------+-------------+---------+ | COLLATION_NAME | CHARACTER_SET_NAME | ID | IS_DEFAULT | IS_COMPILED | SORTLEN | +--------------------+--------------------+------+------------+-------------+---------+ | utf8mb4_bin | utf8mb4 | 46 | Yes | Yes | 1 | | utf8mb4_general_ci | utf8mb4 | 45 | | Yes | 1 | | utf8mb4_unicode_ci | utf8mb4 | 224 | | Yes | 1 | +--------------------+--------------------+------+------------+-------------+---------+ 3 rows in set (0.001 sec)

The description of columns in the COLLATIONS table is as follows:

  • COLLATION_NAME: The name of the collation.
  • CHARACTER_SET_NAME: The name of the character set which the collation belongs to.
  • ID: The ID of the collation.
  • IS_DEFAULT: Whether this collation is the default collation of the character set it belongs to.
  • IS_COMPILED: Whether the character set is compiled into the server.
  • SORTLEN: The minimum length of memory allocated when the collation sorts characters.
Download PDF
Playground
New
One-stop & interactive experience of TiDB's capabilities WITHOUT registration.
Products
TiDB
TiDB Dedicated
TiDB Serverless
Pricing
Get Demo
Get Started
© 2024 PingCAP. All Rights Reserved.
Privacy Policy.