To change the character set to latin1 for the BookSales database, use the following ALTER DATABASE statement : CHARSET « I18N « SQL / MySQL






To change the character set to latin1 for the BookSales database, use the following ALTER DATABASE statement

    
mysql>
mysql> CREATE DATABASE BookSales
    -> DEFAULT CHARACTER SET latin1
    -> DEFAULT COLLATE latin1_bin;
Query OK, 1 row affected (0.00 sec)

mysql>
mysql>
mysql> ALTER DATABASE BookSales
    -> CHARACTER SET latin1;
Query OK, 1 row affected (0.00 sec)

mysql>
mysql> drop database BookSales;
Query OK, 0 rows affected (0.00 sec)

mysql>

   
    
    
    
  








Related examples in the same category

1.Set DEFAULT CHARSET=latin1
2.The CHARSET() function identifies the character set used for a specified string
3.Get CHARSET
4.Get the charset and collation information
5.Optionally, you can specify a default character set and sort order:
6.Change the Character Set of All Text Columns
7.MySQL Character Set Variables
8.Changing the Character Set
9.Specifying the Character Set of a Character String (Cast Operator)
10.CREATE DATABASE statement specifies the character set and collation:
11.CONVERT( USING )
12.Check the character set
13.Check the character set name and description
14.Character setting for char type column
15.CHARACTER SET utf8 for column definition
16.CHARACTER SET 'latin1', CHARACTER SET 'hp8'
17.Check the character set settings
18.Check the default character set name
19.Table with default chartset= latin1;
20.Set default character during table definition