I'm in the progress of migrating my database from latin1 to utf8 character sets/collations.
I wrote a simple script that loops through all of my tables and executes this statement:
ALTER TABLE {database}.
{table}
CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
This works great for almost all of the tables, but I noticed there are a few tables that fail to convert - the ALTER reports successful and there were no errors, but the collation remains as latin1.
Upon further inspection, I noticed that this particular table only has Integer columns, so perhaps this is the reason? But shouldn't that still at least change the table collation in the event I add VARCHARs later?
** edit **
I used phpMyAdmin's UI to convert the table and it gave me a slightly different command:
ALTER TABLE
{table}
DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
What is the difference between these to statements; why would one work and not the other?