mysql校驗字符集

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

發佈了134 篇原創文章 · 獲贊 15 · 訪問量 67萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章