Posts Tagged ‘Unicode’

How to change table’s collation in MySQL

Thursday, January 29th, 2009

You can easily change collation with an ALTER TABLE … CONVERT statement. For example:

alter table book_category convert to character set utf8 collate utf8_unicode_ci;

Note, that it is not equivalent to

alter table book_category default collate utf8_unicode_ci;

which only changes a default collation, so the existing columns preserve their collation.