[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c

解决MySQL报错:1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'informat

[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c

转载WxyangID 发布于2018-05-11 19:11:43 阅读数 2486  收藏

展开

在navicat for mysql中的查询编辑器中执行sql语句总是提示下面的错误,虽然也可以正确的执行,但是看着总有些不对劲,所以就在csdn上查找了解决方案:已验证此解法可以有效。

解决方法:

主要是因为sql_mode设置导致的这个错误。

在新建查询中执行如下命令:

  1. -- 查看sql_mode设置

  2. show variables like "sql_mode";

  3. -- 设置sql_mode

  4. set sql_mode='';

  5. set sql_mode='NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES';

结果证明该方案有效;

也可以参考博主的另一个方法,设置mysql中的my.ini文件。

参考:https://blog.csdn.net/zq33312757/article/details/53118459

*******************************************************************************************************************

选中数据库

-- 查看sql_mode设置  
 show variables like "sql_mode";  
 -- 设置sql_mode  
 set sql_mode='';   
 set sql_mode='NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES';

create table `product_info`(
    `product_id` varchar(32) not null comment '商品id',
    `product_name` varchar(64) not null comment '商品名称',
    `product_price` decimal(8,2) not null comment '单价',
    `product_stock` int not null comment '库存',
    `procuct_description`  varchar(64)  comment  '描述',
    `product_icon` varchar(512) comment '小图',
    `procuct_type` int not null comment '类目编号',
    `create_time` timestamp not null default current_timestamp comment '创建时间',
   primary key (`product_id`) # 这里不是单引号怪不得写不出来 报错
)comment '商品表'

[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c相关推荐

  1. [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated

    mysql客户端查询报这个错误,如下所示: [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and co ...

  2. [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated解决

    今天在使用MySQL查询时报了一个"[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and c ...

  3. MySQL报错1055解决办法:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains

    [mysql报错1055 报错解决办法][Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and cont ...

  4. [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause 的问题 MySQL

    show variables like "sql_mode"; set sql_mode=''; set sql_mode='NO_ENGINE_SUBSTITUTION,STRI ...

  5. sql [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause

    解决当时 错误 show variables like "sql_mode";set sql_mode='';set sql_mode='NO_ENGINE_SUBSTITUTIO ...

  6. mysql--navicat--运行SQL时提示出错信息-1055 - Expression #1 of ORDER BY clause is not in GROUP BYt

    出错提示 [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggrega ...

  7. mysql Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nona

    1. 操作mysql的时候提示如下错误 [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and cont ...

  8. 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contai

    文章目录 1. 现象 2. docker内部mysql容器 解决方案 3. windows和linux 解决方案 1. 现象 在使用sql语句创建表时,报错: 1055 - Expression #1 ...

  9. 执行sql语句提示[Err] 1055 - Expression #2 of SELECT list is not in GROUP BY......错误的解决办法

    当我在navicat中执行sql语句时,出现错误提示[Err] 1055 - Expression #2 of SELECT list is not in GROUP BY clause and co ...

最新文章

  1. <Module>的类型初始值设定项引发异常
  2. 由STGW下载慢问题引发的网络传输学习之旅
  3. jquery最快速入门文档
  4. ssh隧道 mysql,如何通过SSH隧道连接MySQL
  5. Python“三大器”之装饰器1
  6. 准备让MSN机器人可以显示头像
  7. java 调度器怎么调用_OpenSymphony的Quartz里的作业、调度器使用举例
  8. cmake_安装导入静态/动态库的三种方式(find_package INSTALL 使用绝对路径)
  9. Apache Flink 中文社区视频号上线!和大咖们线上见面~
  10. 极易的je-analysis-1.5.3.jar 可与 solr 一起使用 http://www.jesoft.cn/
  11. 我在网易云音乐里看到的那些关于考研的故事
  12. 理解elasticsearch
  13. Rosalind第68题:Counting Optimal Alignments
  14. maven 打包排除指定文件
  15. kotlin-android-extensions插件也被废弃了?扶我起来
  16. 【86期分享】4款小清新PPT模板免费下载
  17. 数据堂公司董事长齐红威应邀参加安徽省政府组织的企业家恳谈会
  18. 红外相机:巨哥红外MAG32产品介绍
  19. 《刻意练习》 思维导图
  20. 派生词 计算机英语,英语词缀ex- (e-,ef- ) (I out,out of II former) 与派生词

热门文章

  1. Hibernate基础
  2. [2020多校A层12.1]树(倍增/单调栈/dfs栈)
  3. Codeforces Round #674 (Div. 3) F. Number of Subsequences 简单计数dp
  4. P2839 [国家集训队]middle 二分 + 主席树 在值域上建区间
  5. CF1305E Kuroni and the Score Distribution
  6. [CQOI2018]异或序列
  7. 树上启发式合并 简单例题
  8. 【CF868F】Yet Another Minimization Problem (决策单调性优化dp+分治)
  9. NOIP2017洛谷P3953:逛公园(分层图最短路、dp、拓扑)
  10. P4127 [AHOI2009]同类分布(数位dp)