7月 19

mysql this is incompatible with sql_mode=only_full_group_by

使用Ebean执行一条sql语句,Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘offline_db.db.id’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by,原因是严格模式下,mysql要求所有在group by中出现的字段,必须在select 中出现过,不过我们可以设置mysql 忽略这种不太严格的sql语句,继续执行 继续阅读