当前位置:   article > 正文

SQL报错 [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains

SQL报错 [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains

今天在新建SQL表格的时候一直报错:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column ‘information_schema.PROFILING.SEQ’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
在这里插入图片描述
网上查到是因为sql_mode设置导致的这个错误

-- 查看sql_mode设置
show variables like "sql_mode";
-- 设置sql_mode
set sql_mode=''; 
set sql_mode='NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES';
  • 1
  • 2
  • 3
  • 4
  • 5

在这里插入图片描述

运行后,问题就成功解决了,可以正常执行SQL语句

在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/人工智能uu/article/detail/899584
推荐阅读
相关标签
  

闽ICP备14008679号