1.in与exsit
select id,name from A where id in(select Aid from B)
//字段 in (集合)
select id,name from A where exsit (select *from B where A.id=B.Aid)
//exist 表
2.partition by与group by
3.聚合函数与分析函数
———————函数——————————————————————————————————
1.mod(a,b)//返回a/b的余数
select mod(78,5) from dual
返回3
2.nullif(expr1,expr2)
//如果expr1=expr2,则返回null
//如果expr1≠expr2,则返回expr1
//expr1不能为null,expr2可以为null
select nullif('ab12','ab12') from dual
3.nvl(expr1,expr2)
//if expr1=null,then expr2
//else if expr1≠null,then expr1
select nvl(字段,-1) from table
4.nvl2(expr1,expr2,expr3)
//if expr1=null,then expr3
//else if expr1≠null,then expr2
select nvl2(sex,'男','女') from students