使用union all 查询,报错:

Illegal mix of collations for operation 'UNION'

相同字段的编码为
utf8_general_ci 与 utf8_unicode_ci ,就会报Illegal mix of collations for operation “UNION”的错误。
解决1:

CONVERT('ABC' USING utf8mb4)

解决2:
直接修改对应字段的编码

Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=

[SQL]SELECT username,password,toutiao_uidFROM pwdtab pLEFT JOIN toutiao_action_article aON p.toutiao_uid=a.toutiao_uid WHERE 1 AND p.id>3000 [Err] 126