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 ÁÐ:
°²×°ÁËOracle 10g£¬Ä¬Èϰ²×°ÁËorclÊý¾Ý¿â£¬Õâ¸öÊý¾Ý¿âÄܲ»ÄÜɾ³ý°¡£¬»¹ÓÐÎÒÈç¹ûн¨ÁËÆäËûÊý¾Ý¿â£¬Ôõô֪µÀÔÚwebÖеǽ²»Í¬Êý¾Ý¿âµÄµØÖ·°¡£¿
1
¿ÉÒÔɾ³ý
2
ÔÚWEBµØÖ·À¸ÖÐÊäÈëµØÖ·µÄʱºòÖ¸¶¨Ð´´½¨µÄÊý¾Ý¿âµÄIP ......
·þÎñÆ÷ºǫ́µÄÊý¾Ý¿âÊÇoracle£¬ÔÚ½ñÌìϵͳµÇ¼µÄʱºò±¨¡°µÇ¼²»ÁËÊý¾Ý¿â£¬IOÒì³£¡±£¬½á¹ûÊÇÈ«¹«Ë¾¶¼µÇ²»ÉÏÈ¥£¬ÎÒÖØÆôÁËһϷþÎñÆ÷²ÅºÃÁË£¬ÎÒÏë¿ÉÄÜÊÇÓû§²¢·¢Á¿Ì«´óµÄÔµ¹Ê£¬²»ÖªµÀ¸÷λ´óϺÈÏͬ²»£¿ÓÐʲô½â¾ö°ì·¨Ã»£¿ ......