Illegal mix of collations (utf8_general_ci,IMPLICIT) and (gbk_chinese_ci,COERCIB
myeclipse8 + mysql: 其中数据库以及表的编码都是utf-8;
Illegal mix of collations (utf8_general_ci,IMPLICIT) and (gbk_chinese_ci,COERCIBLE) for operation 'UNION'
这是在使用union关联时出现的问题;
解决如下: 在代码中 查询出来的字段上添加 convert( using utf8);如:
select '列值' as 列名 from table。。。 换成 select convert('列值' using utf8) as 列名 table。。。
如果有子查询的话 是放在最外层的查询结果上。。。