SQL code:
create or replace procedure tally_log_oper(updatetimes out number,inserttimes out number,deletetimes out number)
is
--½¨ÒéÔÚÉùÃ÷±äÁ¿µÄʱºòÓ¦³õʼ»¯±äÁ¿
v_na number:=0;
v_nb number:=0;
v_nc number:=0;
begin
select count(*) into v_na from log_file where operater='insert';
select count(*) into v_nb from log_file where operater='update';
select count(*) into v_nc from log_file where operater='delete';
inserttimes:=v_na;
updatetimes:=v_nb;
deletetimes:=v_nc;
commit;
end tally_log_oper;
´æ´¢¹ý³ÌÖ´Ðгɹ¦£¬ÏÂÃæÊDzâÊÔ´úÂ룺
SQL code:
declare
aba number:=0;
abb number:=0;
abc number:=0;
begin
exec tally_log_oper(aba,abb,abc);
print to_char(aba);
print to_char(abb);
print to_char(abc);
end;
×îºó´íÎóÈçÏ£º
exec tally_log_oper(aba,abb,abc);
*
ERROR λÓÚµÚ 6 ÐÐ:
ORA-06550: µÚ 6 ÐÐ, µÚ 7 ÁÐ:
PLS-00103: ³öÏÖ·ûºÅ "TALLY_LOG_OPER"ÔÚÐèÒªÏÂÁÐ֮һʱ£º
:= . ( @ % ;
·ûºÅ ":=" ±»Ì滻Ϊ "TALLY_LOG_OPER" ºó¼ÌÐø¡£
ORA-06550: µÚ 7 ÐÐ, µÚ 8 ÁÐ:
PLS-00103: ³öÏÖ·ûºÅ "TO_CHAR"ÔÚÐèÒªÏÂÁÐ֮һʱ£º
:= . ( @ % ;
·ûºÅ ":=" ±»Ì滻Ϊ "TO_CHAR" ºó¼ÌÐø¡£
ORA-06550: µÚ 8 ÐÐ, µÚ 8 ÁÐ:
¿´µ½ÓÐÒ»¸öSUNµÄÔªÀÏ´ÓOracle¹«Ë¾´ÇÖ°£¬¶øÇÒÊÇJava´´Ê¼ÈË——´óÃû¶¦¶¦µÄJames Gosling£¬
ÐÄÖÐÏ൱ÊÜ´ò»÷£¡ºÜ±¯Í´£¡
OrableÕâÊÇÔõôÁË£¬ÄѵÀÕâ¾ÍÊÇËùνµÄÈںϣ¨Ö«½â£¬·Ö»¯£¬Ïûʧ£©Âð£¿
SUNµÄÒ»°ïÀÏÔ±¹¤¶ ......