开发者

MySQL consolidate encoding of all tables

开发者 https://www.devze.com 2023-02-03 15:35 出处:网络
I have a problem with a MySQL database as 开发者_运维知识库some of the tables in it are utf-8 encoded and some are not.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消