MySQL - Change table encoding
Table encoding maybe an issue when dealing with foreign language data. Unicode needs to be the encoding format and there is a chance your table is not.
Here is the DDL to do a conversion to UTF8:
ALTER TABLE {table_name} CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
utf8 and utf8_general_ci is a character_set\server and collationserver respectively.
These values can be looked up in MySQL using:
show variables like 'character_set_server';
show variables like 'collation_server';
Written by Asim Abdul
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Mysql
Authors
Related Tags
#mysql
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#