mysql 错误代码:1267 Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,....

错误代码: 1267

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

解决方法:

select * from user where mobile = in_mobile COLLATE utf8_unicode_ci;

#或者

select * from user where mobile COLLATE utf8_unicode_ci= in_mobile;

#也就是所 COLLATE utf8_unicode_ci放在等号的哪一边都是可以的


你可能感兴趣的:(mysql)