标签:function number replace create return
create or replace function change_sal (p_job varchar2) return number as v_result number(7,2) ; begin if p_job = ‘CLERK‘ then v_result := 0.1 ; elsif p_job = ‘SALESMAN‘ then v_result := 0.15 ; elsif p_job = ‘MANAGER‘ then v_result := 0.2 ; end if; return v_result ; end; declare result number(7,2) := 0 ; begin result := change_sal(‘CLERK‘); DBMS_OUTPUT.PUTON(‘0‘||result); end; |
本文出自 “不灭的信仰” 博客,谢绝转载!
标签:function number replace create return
原文地址:http://wyhstar460.blog.51cto.com/2972581/1636705