Name

SHOW CHARACTER SET

Synopsis

SHOW CHARACTER SET [LIKE 'pattern']

This statement will show all of the character sets installed on the server. To be more selective, use a pattern with the LIKE clause. For instance, to list all of the character sets beginning with the name latin, enter the following:

SHOW CHARACTER SET LIKE 'latin%'\G
*************************** 1. row ***************************
          Charset: latin1
      Description: ISO 8859-1 West European
Default collation: latin1_swedish_ci
           Maxlen: 1
*************************** 2. row ***************************
          Charset: latin2
      Description: ISO 8859-2 Central European
Default collation: latin2_general_ci
           Maxlen: 1
*************************** 3. row ***************************
          Charset: latin5
      Description: ISO 8859-9 Turkish
Default collation: latin5_turkish_ci
           Maxlen: 1
*************************** 4. row ***************************
          Charset: latin7
      Description: ISO 8859-13 Baltic
Default collation: latin7_general_ci
           Maxlen: 1

To see the default character set, use the SHOW VARIABLES statement. To change the client’s character set, use the SET CHARACTER SET statement.

Get MySQL in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.