wangyuheng's Blog

time for change

  • Home
  • About
  • Tags
  • Categories
  • Archives
  • Table of Contents
  • Overview
  1. 1. 现象
  2. 2. 原因
  3. 3. 解决方法
wangyuheng

wangyuheng

天行健 男儿当立志!
110 posts
38 categories
103 tags
GitHub E-Mail

sql使用sum后 没有记录的数据 查出了一条空记录

Posted on 2016-08-30 Edited on 2016-12-09 In bug

转载请注明出处WangYuheng’s Blog

现象

通过sum()函数 查询sql时,报空指针异常

原因

sum对空结果,返回null,预期返回int。

解决方法

在sql中进行过滤

having column is not null
Welcome to my other publishing channels
WeChat
# bug # sql
update事务死锁
eclipse报错Resource is out of sync with the file system
辽ICP备16008709号-1
© 2023 wangyuheng
Powered by Hexo & NexT.Gemini
0%