九、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 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模式。验证是否生效 SELECT @@GLOBAL.sql_mode 或 SELECT @@sql_mode

执行(只是修改会话级别的,只是当前会话生效)set  session sql_mode = ‘‘; 把sql_mode 改成非only_full_group_by模式。验证是否生效 SELECT @@GLOBAL.sql_mode 或 SELECT @@sql_mode

原文地址:https://www.cnblogs.com/feifeifeisir/p/9827680.html

时间: 2024-08-25 04:48:09

九、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 functionally dependent on columns in GROUP BY c

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

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 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

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

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

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

mysql命令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 with s

MySQL sql_mode=only_full_group_by错误

今天在测试服务器上突然出现了这么一个MySQL的问题,同样的代码正式服没有问题,那肯定就是出在了配置上,查了一下原因才明白原来是数据库版本为5.7以上的版本, 默认是开启了 only_full_group_by 模式的,但开启这个模式后,原先的 group by 语句就报错, 查询MySQL版本可以在命令行模式刚连接上数据库时就能看到,或者在进入mysql后使用命令:status查看版本号, 既然是版本的问题,那就查询一下配置看看具体的情况,命令行连接上数据库,再输入命令: select @@s