Illegal mix of collations ((latin1_swedish_ci,IMPLICIT) and (gbk_chinese_ci,COERCIBLE) for operation '='

解决办法
出现Illegal mix of collations ((latin1_swedish_ci,IMPLICIT) and (gbk_chinese_ci,COERCIBLE) for operation '=' 这个错误
查看了数据库发现是建表时设置表的编码为latin1,而数据库server的连接是gbk_chinese_ci的方式。
把表的编码改了就可以了。
alter table tablename convert to character set GBK。

tablename = 你的表的名称!

posted on 2021-03-17 15:37  文种玉  阅读(226)  评论(0编辑  收藏  举报