MySQL中count()、sum()区别
摘要:1、count0函数 里面的参数是列名的的时候,会计算有值项的次数sum(函数 里面的参数是列名的时候,会计算 列名的值的和。2、两个函数在 记录的列名的值为空或者是null时,都不会去统计即count(列名)和sum(列名) 都不计入这条记录 3、count()可以计算出行数,count (1)也
阅读全文
posted @
2023-11-23 16:35
(Play)
阅读(323)
推荐(0) 编辑
Java Collectors.toMap当value为null时报空指针异常完美解决方案
摘要:Map<String, String> resultMap = map.entrySet().stream().collect(Collectors.toMap(entry -> entry.getKey(), entry -> Optional.ofNullable(entry.getValue(
阅读全文
posted @
2023-11-07 10:28
(Play)
阅读(755)
推荐(0) 编辑