摘要:
SQL写法: begin update table_name set salary = 10000 where emp_id = 5; if sql%notfound then insert into table_name (id,name,salary)values("","","") ; end 阅读全文
摘要:
oracle在使用函数计算式会遇到这样的情况:例如sum函数 如果计算的sum值为null,则用0替代 方法1(便于理解): select when sum(c.num) is null then 0 else sum(t.num) from class c 方法2(简单粗暴): NVL(Expr1 阅读全文