当前位置:网站首页>MySQL encounters the problem of expression 1 of select list is not in group by claim and contains nonaggre
MySQL encounters the problem of expression 1 of select list is not in group by claim and contains nonaggre
2022-06-30 07:10:00 【All eyes are on it】
1. Here is my error report
Error reason :
MySQL 5.7.5 And the above functions depend on the detection function . If enabled ONLY_FULL_GROUP_BY
SQL Pattern ( By default ),MySQL Selection list will be rejected ,HAVING Condition or ORDER BY The query reference of the list is in GROUP BY Unnamed non set column in clause , It doesn't depend on them in function .(5.7.5 Before ,MySQL No functional dependency detected , Not enabled by default ONLY_FULL_GROUP_BY. of 5.7.5 A description of the previous behavior , Please see the “MySQL5.6 Reference manual ”.)
Solution 1 :
1: Inquire about mysql relevant mode
1:select @@global.sql_mode;
You can see that the pattern contains ONLY_FULL_GROUP_BY, As long as there is no such configuration .
my Mysql The version is 5.7.23, The default is to bring ONLY_FULL_GROUP_BY Pattern .
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: Reset mode value
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';
3: Restart mysql service
Solution 2
1: Open in Notepad my.cnf file ;
2: stay [mysqld] Add the following sentence to solve the problem by restarting the service after configuration ;
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
3: restart mysql service
边栏推荐
- JS widget wave JS implementation of wave progress bar animation style
- [Hot100]回文子串 与 最长回文子串
- B站首个UP主付费观看视频还是来了!价格“劝退”网友
- Installation du serveur linux redis
- Introduction to go language pointer
- Unity中实现溶解(Dissolve)特效及其原理解析
- Performance comparison of random network, scale-free network, small world network and NS small world matlab simulation
- Browser downloads files as attachments
- Go installation and configuration (1)
- IDEA import导入的类明明存在,却飘红?
猜你喜欢
第一行代码(第三版)学习笔记
ROS service communication programming
神经网络计算量及参数量
Egret P2 physical engine (1) small ball falling demo
Pit stepping record: Supervisor log return information: redis extension is not installed
Class templates and friends
Relevant database questions.
Unity中实现溶解(Dissolve)特效及其原理解析
Vs2019 and SQL
The maximum expression in Oracle database message list is 1000 error
随机推荐
Installation du serveur linux redis
Realization of dissolve effect in unity and its principle analysis
[my advanced OpenGL learning journey] about the access methods of vector and matrix classification of OpenGL shaders: xyzw/rgba/stpq and array subscripts
Connection Flood攻击原理
If I am in Zhuhai, where can I open an account? In addition, is it safe to open a mobile account?
The maximum expression in Oracle database message list is 1000 error
Develop common dependency Libraries
【已实现】服务器jar包启动脚本、shell脚本
Steps for formulating class or file templates in idea
第一行代码(第三版)学习笔记
Four great happenings on earth
[Hot100]10. 正则表达式匹配
How crazy are young people in sideline industry: 3000 monthly salary and 3W sideline income
How does the CPU recognize the code?
Pit stepping record: Supervisor log return information: redis extension is not installed
6、 Shopping ⻋ and orders
Install go language development tools
Linux server installation redis
【每日一题】535. TinyURL 的加密与解密
【Hot100】11. 盛最多水的容器