Check characgter set name and collation name : INFORMATION_SCHEMA « Command MySQL « SQL / MySQL






Check characgter set name and collation name

        
mysql>
mysql> CREATE TABLE CHARSETHP8
    ->       (C1  CHAR(10) NOT NULL,
    ->        C2  VARCHAR(10))
    -> ;
Query OK, 0 rows affected (0.00 sec)

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

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

mysql>

   
    
    
    
    
    
    
    
  








Related examples in the same category

1.Check schema name
2.Check the table name with schema name
3.Check the CHARACTER_SET_NAME in INFORMATION_SCHEMA.COLLATIONS
4.Show the names of the tables that are stored in the INFORMATION_SCHEMA database.
5.Check information for stored procedures by the table information_schema.routines.
6.Using INFORMATION_SCHEMA Tables
7.Schema of information_schema Tables
8.Check table schema for schema table