I have a table in my database and I want run a query like
SELECT column1, column2 FROM my_table WHERE my_condition;
but I want the mysql to return the column2 in utf8 encoding. Is it any function in mysql to do such task? What is that?
column2
You can use CAST and CONVERT to switch between different types of encodings. See: http://dev.mysql.com/doc/refman/5.0/en/charset-convert.html
SELECT column1, CONVERT(column2 USING utf8) FROM my_table WHERE my_condition;
1.4m articles
1.4m replys
5 comments
57.0k users