[Developer] NVL,NVL2,NULLIF,COALESCE,DECADE,CASE
記錄一下NVL,NVL2,NULLIF,COALESCE,DECADE,CASE 函式的意思:
nvl(v1,v2) if v1 is null then result=v2 else result=v1 end
nvl2(v1,v2,v3) if v1 is null then result=v3 else result=v2 end
nullif(v1,v2) if v1=v2 then result=null else result=v1 end
coalesce(v1,v2,.....vn) return the first not null value.
decode(col1,v1,r1,v2,r2,.....,rn) if col1=v1 then result=r1 else if col1=v2 then result=r2........else result=rn.
case when .... then .... end as colname.
nvl(v1,v2) if v1 is null then result=v2 else result=v1 end
nvl2(v1,v2,v3) if v1 is null then result=v3 else result=v2 end
nullif(v1,v2) if v1=v2 then result=null else result=v1 end
coalesce(v1,v2,.....vn) return the first not null value.
decode(col1,v1,r1,v2,r2,.....,rn) if col1=v1 then result=r1 else if col1=v2 then result=r2........else result=rn.
case when .... then .... end as colname.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24237320/viewspace-1991572/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- nvl, nvl2, nullifNull
- nvl、nvl2與nullif函式用法區別Null函式
- to_date、to_char及格式化大小寫 nvl nvl2 nullifNull
- Oracle-nvl和nvl2函式Oracle函式
- 【函式】oracle nvl2 函式函式Oracle
- 對遠端表使用NVL2的bug
- 新學一個函式nvl2(a,b,c)函式
- Oracle中處理空值的函式nvl-nvl2-lnnvl-nullif的用法Oracle函式Null
- [20170424]函式COALESCE優於NVL.txt函式
- [20170503]]函式COALESCE優於NVL 2.txt函式
- nullifNull
- Decade counter
- Slow decade counter
- Decade counter againAI
- COALESCE函式的用法。函式
- Oracle索引合併coalesce操作Oracle索引
- 合併分割槽(coalesce partition)
- The Linux Scheduler: a Decade of Wasted CoresLinuxAST
- Myth:Index Coalesce is less resource intensiveIndex
- 【Oracle的NVL函式用法】Oracle函式
- MySQL 的IFNULL()、ISNULL()和NULLIF()函式MySqlNull函式
- Oracle中coalesce函式的簡單理解Oracle函式
- Oracle關於nvl的一個BugOracle
- sql中的nvl是幹嘛的?SQL
- The development prospect of SAP consultants in China in the next decadedevROS
- 上海聘:SCM Java Developer/Senior DeveloperJavaDeveloper
- oracle caseOracle
- SQL Server COALESCE()函式的2種好用方法SQLServer函式
- SQL Server COALESCE()函式的創新應用SQLServer函式
- oracle plsql case when_end case小記OracleSQL
- sql case語法和plsql case語法!SQL
- 【每日一包0013】to-capital-case,to-constant-case,to-dot-caseAPI
- pl developerDeveloper
- [Developer] CubeDeveloper
- [Developer] RollupDeveloper
- oracle的case函式和case控制結構Oracle函式
- ORACLE CASE WHEN 及 SELECT CASE WHEN的用法Oracle
- Java Case InterviewJavaView