我已经写了这个查询
select *
from order mbo
where storeId in(select storeid
from store bs
INNER JOIN distributioncenter bd
on bd.distributionCenterId = bs.distributionCenterId
where (bd.orderCloseTime > curtime() and date(bo.orderDate)>=date(now())
and bs.storeId=1112211)
or (date(bo.orderDate)>date(now())and bs.storeId=1112211));
这个查询在我的本地运行良好,但在其他同事的系统中我遇到了以下问题。
Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,NUMERIC) for operation '>';
可能是什么问题?
最佳答案
在你的mysql数据库中,“SHOW VARIABLES LIKE 'character_set_%'”,确保它们都是“UTF8”
关于mysql - 遇到问题 : Illegal mix of collations in MySQL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45207543/