The CHARACTER SET attribute specifies the character set, and the COLLATE attribute specifies a collation for the character set : Create Table : Table MySQL TUTORIALS


MySQL TUTORIALS » Table » Create Table »

 

The CHARACTER SET attribute specifies the character set, and the COLLATE attribute specifies a collation for the character set


The ASCII attribute is shorthand for CHARACTER SET latin1.

The UNICODE attribute is shorthand for CHARACTER SET ucs2.

The BINARY attribute is shorthand for specifying the binary collation of the column character set.

The CHAR BYTE data type is an alias for the BINARY data type. This is a compatibility feature.

mysql>
mysql> CREATE TABLE myTable
    -> (
    ->     c1 VARCHAR(20CHARACTER SET utf8,
    ->     c2 TEXT CHARACTER SET latin1 COLLATE latin1_general_cs
    -> );
Query OK, rows affected (0.06 sec)

mysql>
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
» Create Table