Changing the Character Set : CHARSET « I18N « SQL / MySQL






Changing the Character Set

    
mysql>
mysql>
mysql> CREATE TABLE mytable (
    ->     titleID INT NOT NULL AUTO_INCREMENT,
    ->     title varchar(100),
    ->     PRIMARY KEY  (titleID)
    -> );
Query OK, 0 rows affected (0.01 sec)

mysql>
mysql>
mysql>
mysql> SELECT CONVERT(title USING utf8) FROM mytable;
Empty set (0.00 sec)

mysql>
mysql>
mysql> drop table mytable;
Query OK, 0 rows affected (0.00 sec)

   
    
    
    
  








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.Specifying the Character Set of a Character String (Cast Operator)
9.CREATE DATABASE statement specifies the character set and collation:
10.To change the character set to latin1 for the BookSales database, use the following ALTER DATABASE statement
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