mysql校验字符集

来源:互联网 发布:爬虫数据分析 编辑:程序博客网 时间:2024/06/05 03:44

1. 问题:

Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '=' in SQL: select * from relatedinfo a ,b_user_data b where a.phonenum in(17321058011, 17321058155, 17321057077, 17321057918, 17321056123, 17321055887, 17321058911, 17321055898) and a.pin=b.pin Limit 0, 1
2. 解决:

ALTER TABLE relatedinfo CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;

3. 参考

http://www.oschina.net/question/91790_10195

http://www.phptext.net/article_view.php?id=456

0 0