Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '=
其實是表和表之間的字符編碼不匹配造成的,要麼修改表字段的字符編碼,要麼就加函數
SELECT a.id, a.step, a.title, a.content, c.path stepImage FROM carRelaxedStep a
LEFT JOIN city b ON CONVERT(b.code_c USING utf8) COLLATE utf8_unicode_ci = a.cityCodeC
LEFT JOIN FileInfo c ON c.id = a.stepImage
WHERE a.cityCodeC = #{cityCodeC} AND a.isDel =1 ORDER BY step ASC