Tuesday, September 24, 2013

[MySQL][SQL] Change column collation to utf8

SQL statment :
ALTER TABLE '<tablename>' CHANGE '<column_name>' '<column_name>' VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL
 
Use my case to be an example:

ALTER TABLE  'plants' CHANGE  'p121'  'p121' VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL


Result:

 


No comments :

Post a Comment