Oracle数据库的条件判断函数 1.decode函数 decode(条件1,值1,结果1,值2,结果2,结果3); notes:条件1和值1相等,输出结果1;条件1和值2相等,输出结果2;否则输出结果3 2.case when … then … when … then … else … end case when 条件1 then 结果1 when 条件2 then 结果2 else 结果3 end as 别名; notes:条件1成立输出结果1;条件2成立输出结果2;否则输出结果3
1. 批量插入 insert into a (a.字段1,a.字段2) (select b.字段1,b.字段2 from b where b表条件筛选) 2. 批量更新 update a set(a.字段1,a.字段2)=(select b.字段1,b.字段2 from b where b表条件筛选) where a表条件筛选