解决方案 »

  1.   

    全局变量,整个包内都可调用,还可以被其他包调用
    你的意思是两个过程并发时,V_COUNT的值会互串?
      

  2.   

    全局变量,整个包内都可调用,还可以被其他包调用
    你的意思是两个过程并发时,V_COUNT的值会互串?
    可以啊,
    如下:create or replace package test is
      a number;
      procedure a1;
      procedure a2;
    end test;create or replace package body test is  procedure a1 is
      begin
        a := 1;
        dbms_output.put_line(a);
        a2;
        dbms_output.put_line(a);
      end;
      procedure a2 is
      begin
        a := 2;
        dbms_output.put_line(a);
        a1;
        dbms_output.put_line(a);
      end;
    begin
      null;
    end test;
    你可以通过测试a1或者a2来看效果