Skip to content

Latest commit

 

History

History
45 lines (35 loc) · 1.48 KB

information-schema-collation-character-set-applicability.md

File metadata and controls

45 lines (35 loc) · 1.48 KB
title summary
COLLATION_CHARACTER_SET_APPLICABILITY
Learn the `COLLATION_CHARACTER_SET_APPLICABILITY` information_schema table.

COLLATION_CHARACTER_SET_APPLICABILITY

The COLLATION_CHARACTER_SET_APPLICABILITY table maps collations to the applicable character set name. Similar to the COLLATIONS table, it is included only for compatibility with MySQL.

{{< copyable "sql" >}}

USE information_schema;
DESC collation_character_set_applicability;
+--------------------+-------------+------+------+---------+-------+
| Field              | Type        | Null | Key  | Default | Extra |
+--------------------+-------------+------+------+---------+-------+
| COLLATION_NAME     | varchar(32) | NO   |      | NULL    |       |
| CHARACTER_SET_NAME | varchar(32) | NO   |      | NULL    |       |
+--------------------+-------------+------+------+---------+-------+
2 rows in set (0.00 sec)

{{< copyable "sql" >}}

SELECT * FROM collation_character_set_applicability WHERE character_set_name='utf8mb4';
+----------------+--------------------+
| COLLATION_NAME | CHARACTER_SET_NAME |
+----------------+--------------------+
| utf8mb4_bin    | utf8mb4            |
+----------------+--------------------+
1 row in set (0.00 sec)

The description of columns in the COLLATION_CHARACTER_SET_APPLICABILITY 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.