MySQL语句错误及解决方案

1.group by查询错误

ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'qzs.person.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

具体参看我的博客文章:MySQL错误1055

不改变环境的条件下,可用

$ select gender from person group by gender;

进行分组查询,但结果只能查询gender这一个字段。

上一篇:Scala函数式编程(四)函数式的数据结构 上


下一篇:windows server 2008 安装MySQL 8.0 遇到报错 1055 - Expression #1 of ORDER BY clause is not in GROUP BY