Skip to main content
Version: 0.8

COLLATIONS

The COLLATIONS provides information about collations for each character set.

USE INFORMATION_SCHEMA;

SELECT * FROM COLLATIONS;

The output is as follows:

+----------------+--------------------+------+------------+-------------+---------+
| collation_name | character_set_name | id | is_default | is_compiled | sortlen |
+----------------+--------------------+------+------------+-------------+---------+
| utf8_bin | utf8 | 1 | Yes | Yes | 1 |
+----------------+--------------------+------+------------+-------------+---------+

The table has these columns:

  • collation_name: the collation name.
  • character_set_name: the name of the character set.
  • id: the collation ID.
  • 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 system.
  • sortlen: the minimum amount of memory required to sort strings expressed in the character set.