--函数案例
create OR REPLACE function sp_fun1(spName varchar2) return number is yearSal number(7,2); begin select sal*12+nvl(comm,0)*12 into yearSal from emp where ename = spName; return yearSal; end;var a number;
call sp_fun1('SMITH') into:a;--注意into:a之间不能有空格 create or replace procedure sp_pro3 (spName varchar2,newSal number) is begin update emp set sal=newSal where ename=spName; end;