前段时间做sql注入的时候  使用group_concat时,出现标题上的错误。经查阅一位大佬的博客,成功解决!故写此博文!

当mysql的sql_mode是only_full_group_by的时候,在不使用group by 并且select后面出现聚集函数的话,那么所有被select的都应该是聚集函数,否则就会报错!

tips:在select指定的字段要么就要包含在group By语句的后面,作为分组的依据;要么就要被包含在聚合函数中。

MySql 错误:In aggregated query without GROUP BY, expression #1 of SELECT list contains....的更多相关文章

  1. mysql查询出现In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'zhibo.a.id';

    出现问题: Error querying database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: In ...

  2. mysql5.7执行sql语句报错:In aggregated query without GROUP BY, expression #1 of SELECT list contains nonagg

    mysql5.7执行sql语句报错:In aggregated query without GROUP BY, expression #1 of SELECT list contains nonagg ...

  3. Mysql错误:Ignoring query to other database解决方法

    Mysql错误:Ignoring query to other database解决方法 今天登陆mysql show databases出现Ignoring query to other datab ...

  4. Mysql报Packet for query is too large (1040 > 1024)错误

    Linux下mysql 报Packet for query is too large (1040 > 1024)错误的解决方法 项目之前一直正常运行,这几天突然一直提示查询出错,看了下日志发现提 ...

  5. mysql使用group by分组时出现错误ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and

    问题: 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ...

  6. pdo mysql错误:Cannot execute queries while other unbuffered queries are active

    运行环境:PHP 5.5.30-x64,MYSQL  5.6.27 错误代码:Cannot execute queries while other unbuffered queries are act ...

  7. PHP开发者常犯的MySQL错误

    PHP开发者常犯的MySQL错误   数据库是WEB大多数应用开发的基础.如果你是用PHP,那么大多数据库用的是MYSQL也是LAMP架构的重要部分. PHP看起来很简单,一个初学者也可以几个小时内就 ...

  8. mysql错误:The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement解决方法

    本文为大家讲解的是mysql错误:The MySQL server is running with the --skip-grant-tables option so it cannot execut ...

  9. 【mybatis】【mysql】mybatis查询mysql,group by分组查询报错:Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column

    mybatis查询mysql,group by分组查询报错:Expression #1 of SELECT list is not in GROUP BY clause and contains no ...

随机推荐

  1. scala---lazy

    scala中用lazy定义的变量叫做惰性变量,会实现延迟加载.惰性变量只能是不可变的变量.并且只有在调用惰性变量的时候才会被初始化. class Test1 { } object Test1 { de ...

  2. 【NOIP2016】组合数问题 题解(组合数学+递推)

    题目链接 题目大意:给定$n,m,k$,求满足$k|C_i^j$的$C_i^j$的个数.$(0\leq i\leq n,1\leq j\leq \min(i,m))$. --------------- ...

  3. 【FZYZOJ】数论课堂 题解(约数个数定理)

    前言:想了两个小时orz,最后才想到要用约数个数定理…… ------------- 题目大意: 给定$n,q,A[1],A[2],A[3]$ 现有$A[i]=(A[i-1]+A[i-2]+A[i-3 ...

  4. Tomcat访问图片

    Tomcat访问图片 配置server.xml 在 节点中添加 <Context docBase="D:/Tomcat/tomcat-8083/imgs" path=&quo ...

  5. Windows包管理工具-Chocolatey

    Chocolatey是一款专为Windows系统开发的.基于NuGet的包管理器工具,类似于Node.js的npm,MacOS的 brew,Ubuntu的 apt-get,简称为 choco. Cho ...

  6. Linux输出缓存你知道多大吗?

    今天看到这个代码很简单,就是验证一下Linux系统的输出缓存大小.当 猜一下这个代码的输出: #include <stdio.h> #include <string.h> #i ...

  7. 020_go语言中的接口

    代码演示 package main import ( "fmt" "math" ) type geometry interface { area() float ...

  8. 正确认识springcloud的作用。分布式从了解架构到springcloud支撑

    转载于 https://www.cnblogs.com/williamjie/p/9369681.html 基于springCloud的分布式架构体系   Spring Cloud作为一套微服务治理的 ...

  9. 在Linux下安装nginx服务器详细教程

    首先安装centos的扩展源 yum install epel-release 安装Nginx 方法一: yum install nginx -y 查看版本号,开启nginx,查看进程 nginx – ...

  10. Java—构造方法及this/super/final/static关键字

    构造方法 构建创造时用的方法,即就是对象创建时要执行的方法. //构造方法的格式: 修饰符 构造方法名(参数列表) { } 构造方法的体现: 构造方法没有返回值类型.也不需要写返回值.因为它是为构建对 ...