2017-07-20 43 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? –

相關問題