当前位置:网站首页>MYSQL:Expression #4 of SELECT list is not in GROUP BY clause and contains nonaggregated column
MYSQL:Expression #4 of SELECT list is not in GROUP BY clause and contains nonaggregated column
2022-06-12 18:02:00 【DXIANGH】
原因:select 查询的列 没有包含在group by 子句中
解决
方法一:查询的字段全部匹配到gruop by子句
方法二:修改数据库设置
1.
select @@global.sql_mode
2.`@@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.重启数据库
方法三:使用 ANY_VALUE()函数
如:
边栏推荐
- Still using Microsoft office, 3 fairy software, are you sure you don't want to try?
- A method of quickly reusing wechat login authorization in app
- Stream流注意点
- Vant3 +ts packaged simple step advancer component
- 73. matrix zeroing (marking method)
- Advanced mountain -asp Net core router basic use demo 0.1
- 低代码平台调研结果
- error接口原创
- Second week of electric control learning
- Make good use of IDE, speed up R & D efficiency by 100%
猜你喜欢

General differences between SQL server versions released by Microsoft in different periods so far, for reference

字节飞书人力资源套件三面

Nixos 22.05 installation process record

Article name

Variable of C #

企业架构的第一性原理

用好IDE,研发效能提速100%

MySQL learning notes

DRM driven MMAP detailed explanation: (I) preliminary knowledge

Byte flybook Human Resources Kit three sides
随机推荐
有源差分晶振原理图以及LV-PECL、LVDS、HCSL区别
Leetcode151 flipping words in strings
566. reshaping the matrix
Message queuing MySQL tables that store message data
Continued 2 asp Net core router basic use demonstration 0.2 acquisition of default controller data
企业架构的第一性原理
leetcode 300. 最长递增子序列
小程序+App,低成本获客及活跃的一种技术组合思路
SqlServer常用语句及函数
channel原创
Use the official go Library of mongodb to operate the original mongodb
Goframe gredis configuration management | comparison of configuration files and configuration methods
JDBC快速入門教程
js两数之和
用好IDE,研发效能提速100%
73. 矩阵置零(标记法)
LCD parameter interpretation and calculation
1.5 what is an architect (serialization)
Bug record: data truncation: incorrect datetime value:
TypeScript高级类型(二)