Home Tutorial Php Sql MySQL Attribute

 
 

MySQL Attribute
Posted on: December 9, 2010 at 12:00 AM
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        |
+----------------+

Related Tags for MySQL Attribute:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.