开发者

MySQL convert table from Latin1 to utf8

开发者 https://www.devze.com 2023-02-27 01:26 出处:网络
I need to convert a table with a lot of data from Latin1 to utf8 so that i开发者_如何学Pythont can accept Korean characters.How do I alter that table without corrupting the data that\'s in there?What

I need to convert a table with a lot of data from Latin1 to utf8 so that i开发者_如何学Pythont can accept Korean characters. How do I alter that table without corrupting the data that's in there? What would my SQL statement be? What's the best way to proceed?


ALTER TABLE database_name.table_name CONVERT TO CHARACTER SET utf8;


Export (dump) the database, and reimport it with the new encoding.

http://alexking.org/blog/2008/03/06/mysql-latin1-utf8-conversion

0

精彩评论

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

关注公众号