I have a problem with a MySQL database as 开发者_运维知识库some of the tables in it are utf-8 encoded and some are not. I would like to get all the table and data consolidate to be utf-8.
Is there a batch command to achieve so?
Thanks
ALTER TABLE tbl_name CONVERT TO CHARACTER SET charset_name [COLLATE collation_name];
You can whip this into some procedure or batch script.
精彩评论