Rechercher dans le manuel MySQL
13.7.6.4 SHOW COLLATION Syntax
This statement lists collations supported by the server. By
default, the output from SHOW
COLLATION
includes all available collations. The
LIKE
clause, if present, indicates
which collation names to match. The WHERE
clause can be given to select rows using more general
conditions, as discussed in Section 25.42, “Extensions to SHOW Statements”. For
example:
- +-------------------+---------+----+---------+----------+---------+
- +-------------------+---------+----+---------+----------+---------+
- | latin1_german1_ci | latin1 | 5 | | Yes | 1 |
- | latin1_swedish_ci | latin1 | 8 | Yes | Yes | 1 |
- | latin1_danish_ci | latin1 | 15 | | Yes | 1 |
- | latin1_german2_ci | latin1 | 31 | | Yes | 2 |
- | latin1_bin | latin1 | 47 | | Yes | 1 |
- | latin1_general_ci | latin1 | 48 | | Yes | 1 |
- | latin1_general_cs | latin1 | 49 | | Yes | 1 |
- | latin1_spanish_ci | latin1 | 94 | | Yes | 1 |
- +-------------------+---------+----+---------+----------+---------+
SHOW COLLATION
output has these
columns:
Collation
The collation name.
Charset
The name of the character set with which the collation is associated.
Id
The collation ID.
Default
Whether the collation is the default for its character set.
Compiled
Whether the character set is compiled into the server.
Sortlen
This is related to the amount of memory required to sort strings expressed in the character set.
To see the default collation for each character set, use the
following statement. Default
is a reserved
word, so to use it as an identifier, it must be quoted as such:
- +---------------------+----------+----+---------+----------+---------+
- +---------------------+----------+----+---------+----------+---------+
- | big5_chinese_ci | big5 | 1 | Yes | Yes | 1 |
- | dec8_swedish_ci | dec8 | 3 | Yes | Yes | 1 |
- | cp850_general_ci | cp850 | 4 | Yes | Yes | 1 |
- | hp8_english_ci | hp8 | 6 | Yes | Yes | 1 |
- | koi8r_general_ci | koi8r | 7 | Yes | Yes | 1 |
- | latin1_swedish_ci | latin1 | 8 | Yes | Yes | 1 |
- ...
Collation information is also available from the
INFORMATION_SCHEMA
COLLATIONS
table. See
Section 25.4, “The INFORMATION_SCHEMA COLLATIONS Table”.
Document created the 26/06/2006, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/mysql-rf-show-collation.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.