NVL2 (EXPR1,EXPR2,EXPR3): Memory, Nvl2 (), EXPR1 is null, 2 is the 2nd number (that is, EXPR3) returned function: If the parameter expression EXPR1 value is null, the NVL2 () function returns the value of the argument expression EXPR3 If the parameter expression expr1 value is not NULL, the NVL2 () function returns the value of the parameter expression Expr2. NVL (string1, replace_with) function: If string1 is null, the NVL function returns the Replace_with value, otherwise the value of string1 is returned, or null if two parameters are null.
-----------------
Case
Case when a= ' 1 ' and ' xxxx ' when a= ' 2 ' then ' ssss ' else
' Zzzzz ' End as
Note the point:
1. Start with case and end With end
2. When the branch is followed by the condition, then the result is displayed
3, else in addition to the default, similar to the high-level language program switch case default, you can not add
4, END followed by alias
Oracle function NVL2 ... NVL