MYSQL supports multiple character sets such as Chinese, Russian, Latin, Korean ?etc. The character sets supported by MYSQL can be viewed using SHOW CHARACTER SET; statements. The table as given below is displayed with this syntax.

Syntax:

SHOW CHARACTER SET;

Examples of character sets in MySQL

Charset Description Default collation Maxlen
big5 Big5 Traditional Chinese big5_chinese_ci 2
dec8 DEC West European dec8_swedish_ci 1
cp850 DOS West European cp850_general_ci 1
hp8 HP West European hp8_english_ci 1
greek ISO 8859-7 Greek greek_general_ci 1
cp1250 Windows Central European cp1250_general_ci 1

 

 

 

 

 

 

 

...

To get a desired character set 'LIKE' clause can be used to the syntax above. Using 'LIKE' clause for the syntax above to filter the character set with 'greek' is as given below:

SHOW CHARACTER SET LIKE 'GREEK%';

Character set LIKE 'GREEK'

Charset Description Default collation Maxlen
greek ISO 8859-7 Greek greek_general_ci 1

The default character set for MYSQL is latin1. Default collation is latin1_swedish_ci. For non-latin characters utf8 character set is used.

Each character set has minimum of one to many collation. When a TABLE is created, the character set and collation is defined. If both character set and collation is defined, they are used. Else, if the character set only is defined, the collation for that particular character set is used.