当前位置:网站首页>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
边栏推荐
- SuperMap iclient3d for webgl loading TMS tiles
- 【 surprise】 la vitesse de téléchargement de Thunderbolt n'est pas aussi rapide que celle de la machine virtuelle
- "Xiaodeng" user personal data management in operation and maintenance
- After the market value evaporated by 65billion yuan, the "mask king" made steady medical treatment and focused on condoms
- How to use AI technology to optimize the independent station customer service system? Listen to the experts!
- Tencent cloud Database Engineer competency certification was launched, and people from all walks of life talked about talent training problems
- How to use the plug-in mechanism to gracefully encapsulate your request hook
- Visual Studio配置Qt并通过NSIS实现项目打包
- Substrate 源码追新导读: 5月中旬: Uniques NFT模块和Nomination Pool
- LeetCode_栈_中等_227.基本计算器 II(不含括号)
猜你喜欢
How to select an OLAP database engine?
rpm2rpm 打包步骤
Iserver publishing es service query setting maximum return quantity
Today in history: Microsoft acquires PowerPoint developers; SGI and MIPS merge
[target tracking] |pytracking configuring win to compile prroi_ pool. pyd
QT MSVC installation and commissioning
数据仓库建设之确定主题域
SuperMap iDesktop 常见倾斜数据处理全流程解析
Tencent cloud Database Engineer competency certification was launched, and people from all walks of life talked about talent training problems
Dqn notes
随机推荐
Four ways for flinksql to customize udtf
The realization of QT the flipping effect of QQ weather forecast window
Mysql中 begin..end使用遇到的坑
【300+精选大厂面试题持续分享】大数据运维尖刀面试题专栏(二)
Apple executives openly "open the connection": Samsung copied the iPhone and only added a large screen
New function of SuperMap iserver11i -- release and use of legend
浅谈 JMeter 运行原理
RDS MySQL数据迁移PolarDB MySQL费用可以转过去吗?
SuperMap iClient3D 11i for Cesium三维场景中图例使用说明
STM32 移植 RT-Thread 标准版的 FinSH 组件
MATLAB小技巧(22)矩阵分析--逐步回归
第十三章 信号(三)- 示例演示
grep匹配查找
Qt中的事件处理
Spatiotemporal prediction 2-gcn_ LSTM
Swagger2 automatically generates API documents
How to use AI technology to optimize the independent station customer service system? Listen to the experts!
MySQL composite query
Inner join and outer join of MySQL tables
Substrate 源码追新导读: 波卡系波卡权重计算全面更新, Governance 2.0 版本的优化和调整