当前位置:网站首页>When MySQL judges that the execution condition is null, it returns 0. Correct parameter count in the call to native function 'isnull',
When MySQL judges that the execution condition is null, it returns 0. Correct parameter count in the call to native function 'isnull',
2022-06-30 12:46:00 【Full stack programmer webmaster】
Pictured , Today, I will test the report statistics , The actual transaction amount needs to be counted , If there is no actual transaction amount on that day , The statistical result will be NULL, I want the query to be NULL when , return 0, But to perform SQL I threw it when I was in bed (1582, "Incorrect parameter count in the call to native function 'ISNULL'") This anomaly
Check the cause
Because mysql Can't recognize ISNULL As a result of , Change to IFNULL That's all right.
SELECT
IFNULL( sum( spu_amount_all ), 0 )
FROM
test_obp_data.data_user_order_goods
WHERE
pay_time BETWEEN '2021-04-29 00:00:00'
AND '2021-04-30 00:00:00'
AND is_refund = 1;Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/100682.html Link to the original text :https://javaforall.cn
边栏推荐
- 【一天学awk】基础中的基础
- Solve the problem that the server cannot be connected via SSH during reinstallation
- "Xiaodeng" user personal data management in operation and maintenance
- 腾讯二面:@Bean 与 @Component 用在同一个类上,会怎么样?
- 基于ThinkPHP5封装tronapi-波场接口-PHP版本--附接口文档-20220627
- 数据仓库建设之确定主题域
- Scratch drawing square electronic society graphical programming scratch grade examination level 2 true questions and answers analysis June 2022
- Sqlserver query code is 936 simplified Chinese GBK. Should I write 936 or GBK?
- 21. Notes on WPF binding
- Joplin implements style changes
猜你喜欢

rpm2rpm 打包步骤

【驚了】迅雷下載速度竟然比不上虛擬機中的下載速度

Reading the table data of Tencent documents in the applet

90. (cesium chapter) cesium high level listening events

【 surprise】 la vitesse de téléchargement de Thunderbolt n'est pas aussi rapide que celle de la machine virtuelle

Redis installation on Linux system

SuperMap iclient3d for webgl loading TMS tiles

【MySQL】MySQL的安装与配置

Analysis of the whole process of common tilt data processing in SuperMap idesktop

Shell基础入门
随机推荐
Three ways for flinksql to customize udaf
FFMpeg AVBufferPool 的理解与掌握
STM32 移植 RT-Thread 标准版的 FinSH 组件
Redis configuration files and new data types
【一天学awk】数组的使用
JMeter之性能测试流程及性能测试关注点
机器学习笔记 - 自相关和偏自相关简介
Substrate 源码追新导读: 波卡系波卡权重计算全面更新, Governance 2.0 版本的优化和调整
MATLAB小技巧(22)矩阵分析--逐步回归
Tencent two sides: @bean and @component are used on the same class. What happens?
Building a database model using power designer tools
腾讯二面:@Bean 与 @Component 用在同一个类上,会怎么样?
【一天学awk】内置变量的使用
Idea has a new artifact, a set of code to adapt to multiple terminals!
Substrate 源码追新导读: 修复BEEFY的gossip引擎内存泄漏问题, 智能合约删除队列优化
Tronapi-波场接口-源码无加密-可二开--附接口文档-基于ThinkPHP5封装-作者详细指导-2022年6月29日21:59:34
图解使用Navicat for MySQL创建存储过程
QT implementation dynamic navigation bar
Double dqn notes
SuperMap 3D SDKs_Unity插件开发——连接数据服务进行SQL查询