关于我们

后浪云旗下免费主机平台 12+年运维经验

< 返回新闻公共列表

Mysql之ONLY_FULL_GROUP_BY问题解决办法

发布时间:2021-09-23 16:51:08

问题: mysql 语句查询时: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: In aggregated query without GROUP BY, expression #25 of SELECT list contains nonaggregated column ‘nybx.l.PUSH_TIME’; this is incompatible with sql_mode=only_full_group_by错误

解决办法下my.cnf(windows下是my.ini)加以下行
[mysqld]
sql_mode=’STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,
NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,
NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION’


/template/Home/idcegg/PC/Static