CHARACTER SET 'latin1', CHARACTER SET 'hp8' : CHARSET « I18N « SQL / MySQL






CHARACTER SET 'latin1', CHARACTER SET 'hp8'

    
mysql>
mysql> CREATE TABLE TWOCHARSETS
    ->       (C1   CHAR(10) CHARACTER SET 'latin1' NOT NULL,
    ->        C2   VARCHAR(10) CHARACTER SET 'hp8')
    -> ;
Query OK, 0 rows affected (0.00 sec)

mysql> INSERT INTO TWOCHARSETS VALUES ('A', 'A')
    -> ;
Query OK, 1 row affected (0.00 sec)

mysql> SELECT   *
    -> FROM     TWOCHARSETS
    -> WHERE    C1 = C2;
ERROR 1267 (HY000): Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (hp8_english_ci,IMPLICIT) for operation '='
mysql>
mysql> drop table TWOCHARSETS;
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.To change the character set to latin1 for the BookSales database, use the following ALTER DATABASE statement
12.CONVERT( USING )
13.Check the character set
14.Check the character set name and description
15.Character setting for char type column
16.CHARACTER SET utf8 for column definition
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