oracle coalesce函数
时间: 2023-08-29 20:11:00 浏览: 173
在Oracle中,COALESCE函数用于返回参数列表中第一个非NULL的表达式的值。如果所有的表达式都是NULL,则返回NULL值。COALESCE函数的用法为COALESCE(expression_1, expression_2, ..., expression_n)。例如,SELECT COALESCE(NULL, NULL, 3, 4, 5) FROM dual将返回值3,因为3是参数列表中第一个非NULL的值。在COALESCE函数中,所有的表达式必须是相同类型,或者可以隐式转换为相同的类型。使用COALESCE函数可以方便地处理包含空值的表达式,避免计算错误。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [COALESCE()函数](https://blog.csdn.net/weixin_40417658/article/details/82633227)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [Oracle常用函数——COALESCE](https://blog.csdn.net/weixin_30797027/article/details/99046254)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [Oracle函数——COALESCE](https://blog.csdn.net/huangbaokang/article/details/105692024)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文