MYSQL5.7版本sql_mode=only_full_group_by问题

具体出错提示:

[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column ‘information_schema.PROFILING.SEQ‘ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

1、查看sql_mode

select @@global.sql_mode

查询出来的值为:

ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

2、去掉ONLY_FULL_GROUP_BY,重新设置值。

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‘;
时间: 2024-12-24 19:56:21

MYSQL5.7版本sql_mode=only_full_group_by问题的相关文章

九、MySQL 5.7.9版本sql_mode=only_full_group_by问题

MySQL 5.7.9版本sql_mode=only_full_group_by问题 用到GROUP BY 语句查询时com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'col_user_6.a.START_TIME' which is not func

MySQL 5.7.9版本sql_mode=only_full_group_by问题

用到GROUP BY 语句查询时com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'col_user_6.a.START_TIME' which is not functionally dependent on columns in GROUP BY c

MySQL 5.7版本sql_mode=only_full_group_by问题

用到GROUP BY 语句查询时com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'col_user_6.a.START_TIME' which is not functionally dependent on columns in GROUP BY c

windows下MySQL 5.7.19版本sql_mode=only_full_group_by问题

用到GROUP BY 语句查询时出现 which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by错误 解决方法 :执行SET GLOBAL sql_mode = ''; 把sql_mode 改成非only_full_group_by模式. 然后,重新连接数据库,再执行含有group by语句的查询语句:

MySQL数据库学习【补充】MySQL 5.7.9版本sql_mode=only_full_group_by问题

用到GROUP BY 语句查询时com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'col_user_6.a.START_TIME' which is not functionally dependent on columns in GROUP BY c

MYSQL 版本5.7.24 sql_mode=only_full_group_by问题

具体出错提示: [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode

sql_mode=ONLY_FULL_GROUP_BY 导致lepus监控mysql5.7报错

lepus监控mysql5.7出现的问题: 2017-09-12 12:18:53 [INFO] check mysql controller finished. [WARNING] check mysql 192.168.10.9:3306 failure: 1055 Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'information_schema.proce

mysql5.7 gruop by报错this is incompatible with sql_mode=only_full_group_by

解析:在mysql 工具 搜索或者插入数据时报下面错误: ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'database_tl.emp.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible wit

mysql连表分组报错---- sql_mode=only_full_group_by问题解决

#### sql语句报错问题 #1055 - Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'cash.sdb_login_log.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_gr