MySql报错:Error Code: 1267. Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='

主要是连表查询的时候,=左边的字段为utf8_general_ci,右边的字段为utf8_general_ci,就会导致这种问题,解决方法是,把=两边的字段都变成同一种格式,再连表查询

 

select * from PackageInfo where Track COLLATE utf8_unicode_ci in( 

select Tracking COLLATE utf8_unicode_ci from PushToTrackSupplierInfo where Tracking = '1234567890')

posted on 2020-12-28 17:19  jeffh  阅读(203)  评论(0编辑  收藏  举报