oracle中的几个函数
1、with ...as ..
with temp as (select * from table1 where 1=1)
select * from temp
2、union 和 union all
Union:对两个结果集进行并集操作,不包括重复行,同时进行默认规则的排序;
Union All:对两个结果集进行并集操作,包括重复行,不进行排序;
3、NVL2函数
NVL2(E1, E2, E3)的功能为:如果E1为NULL,则函数返回E3,若E1不为null,则返回E2。
4、decode
使用结构:
decode(条件,值1,返回值1,值2,返回值2,...值n,返回值n,缺省值)