2017-07-20 42 views
0

我写了这个查询获取问题:排序规则的非法组合在MySQL

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 '>'; 

可能是什么问题?

+0

@Strawberry所有连接的表是UTF8格式 – Akash

回答

0

在你的MySQL数据库,“SHOW VARIABLES LIKE‘CHARACTER_SET _%’”,确保所有的人都是“UTF8”

+0

你要我运行这个命令? – Akash

+0

我的意思是所有连接的表格格式都在urf8中,我已经验证过它。 – Akash

+0

还有Character_set_client? –

相关问题