create or replace procedure tally_log_oper(inserttally in varchar2 ,updatetally out varchar2,deletetally out varchar2) is v_na number; v_nb number; v_nc number; v_sum number; value_null exception; begin select v_na:=count(*) from log_file_view where operater='insert'; select v_nb:=count(*) from log_file_view where operater='update'; select v_nc:=count(*) from log_file_view where operater='delete'; v_sum:=v_na+v_nb+v_nc; if v_sum is null then raise value_null; end if; inserttally:=to_char(round(v_na/v_sum*100,2))||'%'; updatetally:=to_char(round(v_nb/v_sum*100,2))||'%'; deletetally:=to_char(round(v_nc/v_sum*100,2))||'%'; exception when value_null then dbms_output.pu_line('ûÓÐÈκβÙ×÷'); when others then exit();
ÓÃPL/SQL µÇ½ʱµ¯³ö±¨´í´°¿Ú£¬´íÎóÈçÏ£¡ ORA-01034:ORACLE not available ORA-27101:shared memory realm does not exist ÇëÎÊ£¬ÓÐûÓÐÈËÓöµ½ÕâÖÖÇé¿ö£¬Ôõô½â¾ö£¿Ð»Ð»£¡