case when 语句
时间: 2023-10-12 10:06:45 浏览: 95
case when语句是一种在业务逻辑中常见的处理方式。它有两种形式:简单case when和case搜索函数法。简单case when只能处理等式问题,而case搜索函数法可以处理等式问题和不等式问题。简单的case when语句的语法逻辑是通过指定多个条件和对应的结果来实现逻辑判断。在查询中,可以使用case when语句来进行数据映射处理,将某个字段的值映射为另一个值。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [sql语句case when常用查询总结](https://blog.csdn.net/fengjiandaxia/article/details/125212175)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [关于case when语句的报错问题详解](https://download.csdn.net/download/weixin_38644688/14908023)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文