本菜狗写SQL时各式各样的bug:
-
1370 - execute command denied to user 'username'@'%' for routine 'fulldb.sum'
原因:sum函数要和左括号连在一起,不能换行!
- exists()等子查询里,里面的字段必须指明是属于外层表还是内层表的。
-
1267 - Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='
原因,join的两个表的编码方式不同,用 CONVERT(sr.id USING utf8) 来转换