!!!sql_mode=only_full_group_by配置
Expression #7 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'invoicecertify.goods.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
问题:
select sum(goods.je) je,sum(goods.se) se, goods.hwmc hwmc,goods.zclx zclx ,goods.zcsq zcsq, invoice.state state
,goods.id id,invoice.ref_company_id ref_company_id
from in_goods_detail goods join in_invoice_certification invoice
on invoice.code = goods.code and invoice.number = goods.number
WHERE invoice.cert_state = 3
and (goods.zcsq is null or goods.zcsq = '2017-09')
and ref_company_id = 2107
group by invoice.state,goods.hwmc,goods.zclx,goods.zcsq
测试环境可以用,演示环境不可以用???select version() 不一致,sql_mode 不同
Database changed
mysql>
mysql> set @@GLOBAL.sql_mode='';
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> set sql_mode ='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
Query OK, 0 rows affected (0.00 sec)
以下为copy:
mysql命令gruop by报错this is incompatible with sql_mode=only_full_group_by
!!!sql_mode=only_full_group_by配置的更多相关文章
- 【Solution】MySQL 5.8 this is incompatible with sql_mode=only_full_group_by
[42000][1055] Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated colu ...
- MySQL查询语句报错 sql_mode=only_full_group_by 问题
升级MySQL到5.7后,查询语句总是报sql_mode=only_full_group_by问题,总结归纳了两种解决方案,推存第二种解决方案. 报错信息: [Err] 1055 - Expressi ...
- MySQL sql_mode=only_full_group_by错误
今天在测试服务器上突然出现了这么一个MySQL的问题,同样的代码正式服没有问题,那肯定就是出在了配置上,查了一下原因才明白原来是数据库版本为5.7以上的版本, 默认是开启了 only_full_gro ...
- Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: ..... this is incompatible with sql_mode=only_full_group_by
一.异常信息 org.springframework.jdbc.BadSqlGrammarException: ### Error querying database. Cause: com.mysq ...
- 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 ...
- 最近升级mysql5.7出现下面问题,ORDER BY clause is not in GROUP BY..this is incompatible with sql_mode=only_full_group_by
执行sql: SELECT * FROM `user_link` WHERE `group_id` IN ('78', '79') GROUP BY `link_id` 报错: SQLSTATE[42 ...
- 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 nonaggr ...
- mysql报错this is incompatible with sql_mode=only_full_group_by
1.报错信息 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: In aggregated query without GROUP ...
- mysql5.7 this is incompatible with sql_mode=only_full_group_by错误
解决办法: https://blog.csdn.net/qq_42175986/article/details/82384160 前言: 一.原理层面 这个错误发生在mysql 5.7 版本及以上版本 ...
随机推荐
- sysbench的安装与简单使用
1. 下载sysbench的文件 https://codeload.github.com/akopytov/sysbench/zip/1.0.15 2. 放进linux机器以及进行解压缩 unzip ...
- k8s kubectl edit 方式修改 nodeport 的端口
0. 买了一本 每天五分钟玩转 k8s 还有 刚才转帖的blog 里面有一个 kubectl edit 的语法能够在线更改端口号 ,之前一直没弄明白. 刚才做了下实验.发现很好用 这里记录一下. 1. ...
- Delphi实现DBGrid全选和反选功能
Delphi实现Dbgrid全选和反选.清除全选的功能,不管是在Delphi下,还是在WEB开发中,这种功能都是很实用的,是进行数据批量操作的基础.本模块就是实现了为Delphi的DBGrid数据列表 ...
- 【bzoj5073】[Lydsy1710月赛]小A的咒语 后缀数组+倍增RMQ+贪心+dp
题目描述 给出 $A$ 串和 $B$ 串,从 $A$ 串中选出至多 $x$ 个互不重合的段,使得它们按照原顺序拼接后能够得到 $B$ 串.求是否可行.多组数据. $T\le 10$ ,$|A|,|B| ...
- anaconda的spyder打不开
因为最近一段时间没有用Spyder,今天使用时,发现Spyder又又打不开了. 之前遇到Spyder打不开的情况时,是根据这里的教程:删除.matplotlib和.spyder两个文件,但这次删除这两 ...
- Enum 枚举值 (一) 获取描述信息
封装了方法: public static class EnumOperate { public class BaseDescriptionAttribute : DescriptionAttribut ...
- 51Nod 1287 加农炮 (线段树)
1287 加农炮 题目来源: Codility 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 收藏 关注 一个长度为M的正整数数组A,表示从左向右的地形高度 ...
- Racket Cheat Sheet
Racket Cheat Sheet 来源 http://docs.racket-lang.org/racket-cheat/index.html?q=Racket%20Cheat%20Sheet ...
- ASP.NET MVC验证框架中关于属性标记的通用扩展方法
http://www.cnblogs.com/wlb/archive/2009/12/01/1614209.html 之前写过一篇文章<ASP.NET MVC中的验证>,唯一的遗憾就是在使 ...
- android adb介绍
1. 什么是adb 在SDK的Tools文件夹下包含着Android模拟器操作的重要命令ADB,ADB的全称为Android Debug Bridge,就是调试桥的作用.可以与模拟器或android设 ...