mysql查询报错: ORDER BY clause is not in GROUP BY..this is incompatible with sql_mode=only_full_group_by
错误的原因是我mysql版本是5.7的,使用如下语句查询可知select@@sql_mode;里面默认设置了sql_mode=only_full_group_by解决办法:[mysqld]下配置文件添加sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE