存储过程
存储过程语法 创建过程 无参 create or replace procedure NoParPro as //声明 ; begin // 执行 ; exception//存储过程异常 ; end; 带参 create or replace procedure queryempname(sfindno emp.empno%type) //%type表示参数属性与表emp的empno字段一样 as sName emp.ename%type; sjob emp.job%type; begin .... exception .... end; 带参并赋值 create or replace procedure runbyparmeters (isal in emp.sal%type, sname out varchar, sjob in out varchar) as icount number; begin select count(*) into icount from emp where sal>isal and job=sjob; if icount=1 then .... else .... end if; exception when too_many_rows then DBMS_OUTPUT.PUT_LINE('返回值多于1行'); when others then