mysql5.7执行sql语句报错:In aggregated query without GROUP BY, expression #1 of SELECT list contains nonagg
来源:互联网 发布:如何开农村淘宝店 编辑:程序博客网 时间:2024/04/29 12:30
mysql5.7执行sql语句报错:In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'yunva_changke.u.user_id'; this is incompatible with sql_mode=only_full_group_by
1.方法1,需要重启mysql服务
编辑/etc/my.cnf文件,加入如下参数,重启mysql
sql_mode = "STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER"
2.方法2,不需要重启mysql服务
可以看到模式为only_full_group_by
mysql>show variables like '%sql_mode';
mysql> show session variables like '%sql_mode%';
mysql> show global variables like '%sql_mode%';
使当前会话失效
mysql> set global sql_mode='';
mysql> set session sql_mode='';
1.方法1,需要重启mysql服务
编辑/etc/my.cnf文件,加入如下参数,重启mysql
sql_mode = "STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER"
2.方法2,不需要重启mysql服务
可以看到模式为only_full_group_by
mysql>show variables like '%sql_mode';
mysql> show session variables like '%sql_mode%';
mysql> show global variables like '%sql_mode%';
使当前会话失效
mysql> set global sql_mode='';
mysql> set session sql_mode='';
0 1
- mysql5.7执行sql语句报错:In aggregated query without GROUP BY, expression #1 of SELECT list contains nonagg
- MySQL报错“Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre”
- Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'userinfo.
- 出现In aggregated query without GROUP BY原因
- jdbc4.MySQLSyntaxErrorException:Expression #2 of SELECT list is not in GROUP BY clause and contains
- MySQL: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column '
- ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregate
- mysql遇见Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre的问题
- Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'test.tdb_
- mysql遇见Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre的问题
- #1055 - Expression of SELECT list is not in GROUP BY clause and contains nonaggregated column this i
- [mysql] Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'lo
- MySQL: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'sss
- Error Code: 1055. Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated
- mysql数据库执行查询遇到 Expression #2 of SELECT list is not in GROUP BY的问题
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c
- [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated..
- 压轴题1
- 开始写博客
- 带你读开源—ASP.NET_MVC(十一)
- Opencv在视频中静态、动态方式绘制矩形框ROI
- 搬桌子
- mysql5.7执行sql语句报错:In aggregated query without GROUP BY, expression #1 of SELECT list contains nonagg
- 网站优化远比想象的难
- JZOJ4772. 【NOIP2016提高A组模拟9.9】运输妹子
- POJ-1459-Power Network(网络最大流)
- [Easy] Nim Game
- CGI、FastCGI、PHP-CGI、PHP-FPM、Spawn-FCGI解析
- MySQL事务的隔离级别
- CodeForces 358A
- September 10th 模拟赛C T2 火炬手 Solution