All pages
Powered by GitBook
1 of 1

Loading...

Information Schema CHARACTER_SETS Table

The Information Schema CHARACTER_SETS table contains a list of supported character sets, their default collations, and maximum lengths.

The Information Schema CHARACTER_SETS table contains a list of supported character sets, their default collations and maximum lengths.

It contains the following columns:

Column
Description

CHARACTER_SET_NAME

Name of the character set.

DEFAULT_COLLATE_NAME

Default collation used.

DESCRIPTION

The statement returns the same results (although in a different order), and both can be refined in the same way. For example, the following two statements return the same results:

and

See for details on specifying the character set at the server, database, table and column levels, and for a full list of supported characters sets and collations.

Example

This page is licensed: CC BY-SA / Gnu FDL

Character set description.

MAXLEN

Maximum length.

SHOW CHARACTER SET
Setting Character Sets and Collations
Supported Character Sets and Collations
SHOW CHARACTER SET WHERE Maxlen LIKE '2';
SELECT * FROM information_schema.CHARACTER_SETS 
WHERE MAXLEN LIKE '2';
SELECT CHARACTER_SET_NAME FROM information_schema.CHARACTER_SETS 
WHERE DEFAULT_COLLATE_NAME LIKE '%chinese%';
+--------------------+
| CHARACTER_SET_NAME |
+--------------------+
| big5               |
| gb2312             |
| gbk                |
+--------------------+