当前位置:网站首页>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()函数
如:
边栏推荐
- PHP implementation of infinite classification tree (recursion and Optimization)
- Introduction to cookie usage
- 联想回应笔记本太多太杂乱:现在是产品调整期 未来将分为数字/Air/ Pro三大系列
- js二分法
- 73. matrix zeroing (marking method)
- grpc-swift入门
- ESP32-C3 ESP-IDF 配置smartconfig 和 sntp 获取网络时间
- USB to serial port - maximum peak serial port baud rate vs maximum continuous communication baud rate
- 有源差分晶振原理图以及LV-PECL、LVDS、HCSL区别
- USB转串口那些事儿—串口驱动类型
猜你喜欢
MySQL learning notes
Lightweight and convenient small program to app technology solution to realize interconnection with wechat / traffic app
迄今微软不同时期发布的SQL Server各版本之间的大致区别,供参考查阅
Schematic diagram of active differential crystal oscillator and differences among lv-pecl, LVDS and HCSL
小程序和App同时拥有?两者兼得的一种技术方案
USB转串口那些事儿—最大峰值串口波特率VS连续通信最高波特率
Click the list page of vant3+ts+pinia tab to enter the details. The tab on the details page is highlighted in the original position, and the refresh highlight is in the first item by default
Small program +app, a low-cost and active technology combination idea
vant3+ts+pinia tab选项卡列表页面点击进详情,详情页返回tab高亮在原位置,刷新高亮默认在第一项
用好IDE,研发效能提速100%
随机推荐
在同花顺开户证券安全吗
Click the list page of vant3+ts+pinia tab to enter the details. The tab on the details page is highlighted in the original position, and the refresh highlight is in the first item by default
SqlServer常用语句及函数
Use of split method of string
Codeforces Round #398 (Div. 2) D. Cartons of milk
Global lock, table lock, row lock
Leetcode151 flipping words in strings
Message queuing MySQL tables that store message data
机器学习系列(3):Logistic回归
机器学习系列(5):朴素贝叶斯
Schematic diagram of active differential crystal oscillator and differences among lv-pecl, LVDS and HCSL
Write a select based concurrent server
js将数组中的0移动到末尾
Introduction to cookie usage
SSM集成FreeMarker以及常用语法
Advanced mountain -asp Net core router basic use demo 0.1
vant3+ts+pinia tab选项卡列表页面点击进详情,详情页返回tab高亮在原位置,刷新高亮默认在第一项
有关cookie的用法介绍
C brief introduction
Vant3+ts dropdownmenu drop-down menu, multi data can be scrolled