MySQL 5.6 错误记录

简单记录

MySQL5.6 在服务器出现了报错,具体信息如下:

SELECT list is not in GROUP BY clause and contains nonaggregated column '表名' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

错误的具体原因是SELECT子句的字段必须出现在GROUP BY后面,因为数据库设置了sql_mode=only_full_group_by,解决方法网上已经给出了方案,提供一个链接:mysql遇见Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre的问题