Home Tutorial Php Sql MySQL Attribute

 
 

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

Related Tags for MySQL Attribute:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: December 9, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com