decode 类似 case when
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                decode 类似 case when
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                ?
將查詢的結果翻譯成其他值,類似 case ?when?to_char(創建時間,'mm') ='01' then '查詢統計的是1月?'?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??? ? ? ?when?to_char(創建時間,'mm') ='02' then '查詢統計的是2月?'?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?when?to_char(創建時間,'mm') ='03' then '查詢統計的是3月?'?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?.......................
select decode( to_char(創建時間,'mm') , '01' , '查詢統計的是1月 ', '02' , '查詢統計的是2月 ', '07', '查詢統計的是7月'),創建時間
from TAB_數據字典表
轉載于:https://www.cnblogs.com/dashanruolong/p/5704251.html
總結
以上是生活随笔為你收集整理的decode 类似 case when的全部內容,希望文章能夠幫你解決所遇到的問題。
                            
                        - 上一篇: Intellij idea 快键键
 - 下一篇: 【转】LAMP网站架构方案分析【精辟】