The SHOW COLUMNS statement displays the collations of a table's columns when invoked as SHOW FULL COLUMNS : COLLATION Character Set : Table MySQL TUTORIALS


MySQL TUTORIALS » Table » COLLATION Character Set »

 

The SHOW COLUMNS statement displays the collations of a table's columns when invoked as SHOW FULL COLUMNS


Columns with CHAR, VARCHAR, or TEXT data types have collations.

Numeric and other non-character types have no collation (indicated by NULL as the Collation value).

mysql>
mysql>
mysql>
mysql>
mysql> CREATE TABLE myTable
    -> (
    ->     c1 CHAR(10)
    -> DEFAULT CHARACTER SET latin1 COLLATE latin1_danish_ci;
Query OK, rows affected (0.03 sec)

mysql>
mysql> desc myTable;
+-------+----------+------+-----+---------+-------+
| Field | Type     | Null | Key | Default | Extra |
+-------+----------+------+-----+---------+-------+
| c1    | char(10| YES  |     | NULL    |       |
+-------+----------+------+-----+---------+-------+
row in set (0.00 sec)

mysql>
mysql> SHOW FULL COLUMNS FROM myTableG
*************************** 1. row ***************************
     Field: c1
      Type: char(10)
 Collation: latin1_danish_ci
      Null: YES
       Key:
   Default: NULL
     Extra:
Privileges: select,insert,update,references
   Comment:
row in set (0.00 sec)

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

mysql>



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo Table
» COLLATION Character Set