MySQL Attribute


 

MySQL Attribute

This example illustrates how to use the COLLATE attribute in MySQL.

This example illustrates how to use the COLLATE attribute in MySQL.

MySQL Attribute

This example illustrates how to use the COLLATE attribute in MySQL.

In this example we use the COLLATE attribute to define the attribute of the table. In the query below character data types (CHAR, VARCHAR, TEXT) can include CHARACTER SET and COLLATE attributes to specify the character set and collation for the column.

Query

CREATE TABLE atttribute (attribute_name CHAR(20) CHARACTER SET utf8 COLLATE utf8_bin);

Query

insert into atttribute (attribute_name) values('collate');

Output

+----------------+
| attribute_name |
+----------------+
| collate        |
+----------------+

Ads