Check the collation name : Collate « I18N « SQL / MySQL






Check the collation name

       
mysql> CREATE TABLE TABUTF8
    ->       (C1   CHAR(10) NOT NULL,
    ->        C2   VARCHAR(10))
    ->    DEFAULT CHARACTER SET utf8
    -> ;
Query OK, 0 rows affected (0.00 sec)

mysql> SELECT   COLUMN_NAME, CHARACTER_SET_NAME
    -> FROM     INFORMATION_SCHEMA.COLUMNS
    -> WHERE    TABLE_NAME = 'TABUTF8';
+-------------+--------------------+
| COLUMN_NAME | CHARACTER_SET_NAME |
+-------------+--------------------+
| C1          | utf8               |
| C2          | utf8               |
+-------------+--------------------+
2 rows in set (0.00 sec)

mysql>
mysql> SELECT   TABLE_NAME, COLUMN_NAME, COLLATION_NAME
    -> FROM     INFORMATION_SCHEMA.COLUMNS
    -> WHERE    TABLE_NAME IN ('TABUCS2', 'TABDEFKARSET');
Empty set (0.00 sec)

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

mysql>
mysql>

   
    
    
    
    
    
    
  








Related examples in the same category

1.Set COLLATE=latin1_german1_ci
2.ORDER BY and COLLATE latin1_german2_ci
3.ALTER TABLE employee MODIFY employee VARCHAR(60) CHARACTER SET latin1 COLLATE latin1_german2_ci;
4.ORDER BY CONVERT(firstname USING utf8) COLLATE utf8_polish_ci;
5.SELECT firstname FROM employee ORDER BY firstname COLLATE latin1_general_ci
6.SELECT firstname FROM employee ORDER BY firstname COLLATE latin1_german1_ci
7.SELECT firstname FROM employee ORDER BY firstname COLLATE latin1_swedish_ci
8.SELECT firstname FROM employee ORDER BY firstname COLLATE utf8_general_ci
9.COLLATE sort operator allows you ro specify a collation in your expression.
10.Create database with character set and collate
11.Change the character set name and collate name for database
12.Change collate for database
13.COLLATE utf8_romanian_ci for column definition
14.Set the character set and collate for a table
15.COLLATE 'latin1_danish_ci'
16.ORDER BY a column COLLATE latin1_swedish_ci
17.Cast COLLATE
18.Order by collate
19.Alter table to change the collate setting
20.Get collation
21.ERROR 1267 (HY000): Illegal mix of collations (latin1_general_ci,IMPLICIT) and (latin1_danish_ci,IMPLICIT) for operation '='