which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mod
Posted 努力lshdnks
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mod相关的知识,希望对你有一定的参考价值。
which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mod...
项目中基础sql没按照严格模式,查询的列(无聚合函数等)没有添加在GROUP BY 后面,导致语法报错,
设置自己本地mysql的sql_mode,去掉ONLY_FULL_GROUP_BY。
查询:
SELECT @@sql_mode;
设置全局sql_mode,需要用root用户设置,如下:
set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
以上是关于which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mod的主要内容,如果未能解决你的问题,请参考以下文章
which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mod
JAVA错误提示:The operation is not applicable to the current selection.Select a field which is not declar
解决“requires XXX which is not installed“
Called attach on a child which is not detached