Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '='

时间:2020-06-18 16:05:05   收藏:0   阅读:2108

执行类似如下SQL时:

select a.xxx
from a bjdm, b
where a.id=b.id and a.yyy=‘20000007‘ ;

 

报错如下
Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation ‘=‘

 

解决办法:
alter table a convert to character set utf8mb4 collate utf8mb4_general_ci;

alter table b convert to character set utf8mb4 collate utf8mb4_general_ci;

 

原文:https://www.cnblogs.com/liang545621/p/13157943.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!