![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
MySQL
数据库
xsx_only
静下心来才能知道自己的方向是否正确
展开
-
MySQL中Group By遇到 SELECT list is not in GROUP BY clause and contains nonaggregated ........
遇见的报错具体是这样的:Expression #5 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'a.time2' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by大概的意思就是:select 语句中的原创 2020-07-09 15:26:27 · 954 阅读 · 0 评论 -
MySQL中count和sum区别和注意事项
这两个函数我们平时应该用的都比较多,在此记录一下自己填坑的事件!count函数count()函数是统计查询结果中的行数,他是能自动忽略掉NULL这个值的,如果我们有以下表 user_auth使用count()函数再来查,mysql > select count(*) from user_auth ; 就会得到数据: 注意:count会忽略掉 NULL 的结果,所以count(字段名)这样使用的话,如果字段中包含为null的结果,将导致查...原创 2020-05-15 20:32:51 · 559 阅读 · 0 评论