博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
MySQL 5.7.9版本sql_mode=only_full_group_by问题
阅读量:6090 次
发布时间:2019-06-20

本文共 2508 字,大约阅读时间需要 8 分钟。

Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 27Server version: 5.7.12 MySQL Community Server (GPL)Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> SELECT @@GLOBAL.sql_mode;    +-------------------------------------------------------------------------------------------------------------------------------------------+| @@GLOBAL.sql_mode                                                                                                                         |+-------------------------------------------------------------------------------------------------------------------------------------------+| 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 |+-------------------------------------------------------------------------------------------------------------------------------------------+1 row in set (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.02 sec)mysql> select @@sql_mode;+------------------------------------------------------------------------------------------------------------------------+| @@sql_mode                                                                                                             |+------------------------------------------------------------------------------------------------------------------------+| STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |+------------------------------------------------------------------------------------------------------------------------+1 row in set (0.00 sec)

<select id="countAll" resultType="java.lang.Long" >

SELECT COUNT(*) FROM (
SELECT * FROM
(SELECT * FROM order_bid_did_relation
ORDER BY TIME DESC) AS T
GROUP BY T.BID
) AS TT
ORDER BY TT.time DESC
</select>
<select id="getAll" resultMap="BaseResultMap" >
SELECT * FROM (
SELECT * FROM
(SELECT * FROM order_bid_did_relation
ORDER BY time DESC) AS T
GROUP BY T.BID
) AS TT
ORDER BY TT.time DESC
limit #{startRow},#{pageSize}
</select>

 

转载于:https://www.cnblogs.com/alamps/p/7911690.html

你可能感兴趣的文章
php语法同java语法的基本区别(实例项目需求,php才能熟)
查看>>
安卓开发(Java)中关于final关键字与线程安全性
查看>>
asp.net 判断用户是否使用微信浏览器
查看>>
SQL优化之limit 1
查看>>
How to fix Rosetta stone error 2123 -- "This was an error in the application"
查看>>
SAP NCO3.0 发布了
查看>>
智能表单设计器Web Free Form Designer:FreeForm表单控件使用方法之:基础控件
查看>>
检查页面Session是否过期,过期执行相应操作 解决方法
查看>>
Windows Phone 项目实战之账户助手升级
查看>>
Java实例开发05-02 简单的HTTP服务器端
查看>>
关于字符 字节 python3
查看>>
透明度和背景透明---opacity&transparent
查看>>
[zz]为 OpenStack Nova 制作 Ubuntu 镜像
查看>>
linux下python 模块调用
查看>>
windows mobile 5.0 PocketPC模拟器在WIN7上网的设置
查看>>
WireShark (二)
查看>>
研发游戏的那点事儿
查看>>
I/O端口和I/O内存
查看>>
利用 Microsoft StreamInsight 控制较大数据流
查看>>
Net线程间通信的异步机制
查看>>