ORACLE创建包和包体及包中函数和存储过程

原创 2013年12月03日 09:15:37

创建包声明的过程脚本:

CREATE OR REPLACE PACKAGE "COM_BOS" is

  -----------------------------------------------------------------------
  -- 描述:
  --   构造b类型缓存的sql语句
  -- 参数:
  --   @i_bostype:业务类型
  --   @i_bostime:时间类型
  --   @i_timecond:时间条件
  -- 返回值:
  --   返回进行缓存操作的SQL语句
  -----------------------------------------------------------------------
  function fn_compose_b_cache_sql(i_bostype number, i_bostime number, i_timecond varchar2) return varchar2;

  -----------------------------------------------------------------------
  -- 描述:
  --   构造e类型缓存的sql语句
  -- 参数:
  --   @i_bostype:业务类型
  --   @i_bostime:时间类型
  --   @i_timecond:时间条件
  -- 返回值:
  --   返回进行缓存操作的SQL语句
  -----------------------------------------------------------------------
  function fn_compose_e_cache_sql(i_bostype number, i_bostime number, i_timecond varchar2) return varchar2;

  -----------------------------------------------------------------------
  -- 描述:
  --   构造d类型缓存的sql语句
  -- 参数:
  --   @i_bostype:业务类型
  --   @i_bostime:时间类型
  --   @i_timecond:时间条件
  -- 返回值:
  --   返回进行缓存操作的SQL语句
  -----------------------------------------------------------------------
  function fn_compose_d_cache_sql(i_bostype number, i_bostime number, i_timecond varchar2) return varchar2;

  -----------------------------------------------------------------------
  -- 描述:
  --   构造f类型缓存的sql语句
  -- 参数:
  --   @i_bostype:业务类型
  --   @i_bostime:时间类型
  --   @i_timecond:时间条件
  -- 返回值:
  --   返回进行缓存操作的SQL语句
  -----------------------------------------------------------------------
  function fn_compose_f_cache_sql(i_bostype number, i_bostime number, i_timecond varchar2) return varchar2;
 -----------------------------------------------------------------------
  -- 描述:
  --   缓存调用的入口
  -- 参数:
  --   @i_type:缓存类型
  --   @i_subtype:缓存子类型
  --   @i_starttime:数据开始时间
  -- 返回值:
  --   void
  -----------------------------------------------------------------------
  function fnsummarysql1(in_kpitype number, in_timetype number, in_time number, in_cunt0 number,
    in_traders number,
    in_paths number,
    in_limit1 number,
    in_limit2 number ) return varchar2;
  function fnsummarysql2(in_kpitype number, in_time number ) return varchar2;
  -----------------------------------------------------------------------
  -- 描述:
  --   获取时延统计概要数据
  -- 参数:
  --   @out_result:输出数据
  -- 返回值:
  --   void
  -----------------------------------------------------------------------
  procedure getlatencysummary(
    out_result out sys_refcursor
  );
  -----------------------------------------------------------------------
  -- 描述:
  --   获取时延统计概要数据
  -- 参数:
  --   @out_result:输出数据
  -- 返回值:
  --   void
  -----------------------------------------------------------------------
  procedure dosummarycachenow(
    in_s number
  );
  -----------------------------------------------------------------------
  -- 描述:
  --   获取时延随时间分布数据
  -- 参数:
  --   @out_result:输出数据
  --   @in_bostype:业务类型
  --   @in_bostime:时间类型
  --   @in_latencytype:延迟类型
  --   @in_delta:统计粒度
  --   @in_from:统计开始时间
  --   @in_to:统计结束时间
  -- 返回值:
  --   void
  -----------------------------------------------------------------------
  procedure getlatency(
    out_result out sys_refcursor,
    in_bostype number,
    in_bostime number,
    in_latencytype number,
    in_delta number,
    in_from number,
    in_to number
  );
  end com_bos;

创建包体的过程:

CREATE OR REPLACE PACKAGE BODY "COM_BOS" is
  -----------------------------------------------------------------------
  -- 描述:
  --   构造b类型缓存的sql语句
  -- 参数:
  --   @i_bostype:业务类型
  --   @i_bostime:时间类型
  --   @i_timecond:时间条件
  -- 返回值:
  --   返回进行缓存操作的SQL语句
  -----------------------------------------------------------------------
  function fn_compose_b_cache_sql(i_bostype number, i_bostime number, i_timecond varchar2) return varchar2
  as
    v_table varchar2(32);
  begin
    v_table := 'cache_b'||i_bostype||'t'||i_bostime;
    return 'select * from (select * from '||v_table||' union all
        select max(time),sum(cunt),sum(cunt0),sum(cunt1),sum(cunt2),sum(cunt3),sum(totallatency),max(maxlatency),min(minlatency) from '||v_table||'m
        )' || i_timecond;
  end;

  -----------------------------------------------------------------------
  -- 描述:
  --   构造e类型缓存的sql语句
  -- 参数:
  --   @i_bostype:业务类型
  --   @i_bostime:时间类型
  --   @i_timecond:时间条件
  -- 返回值:
  --   返回进行缓存操作的SQL语句
  -----------------------------------------------------------------------
  function fn_compose_e_cache_sql(i_bostype number, i_bostime number, i_timecond varchar2) return varchar2
  as
    v_table varchar2(32);
  begin
    v_table := 'cache_e'||i_bostype||'t'||i_bostime;

    return ' select * from (select * from '||v_table||' union all
          select max(time),point,sum(pcunt),sum(ps0cunt),sum(ps1cunt),sum(ps2cunt),sum(perrcunt) from '||v_table||'m group by point
          )' || i_timecond;
  end;

  -----------------------------------------------------------------------
  -- 描述:
  --   构造d类型缓存的sql语句
  -- 参数:
  --   @i_bostype:业务类型
  --   @i_bostime:时间类型
  --   @i_timecond:时间条件
  -- 返回值:
  --   返回进行缓存操作的SQL语句
  -----------------------------------------------------------------------
  function fn_compose_d_cache_sql(i_bostype number, i_bostime number, i_timecond varchar2) return varchar2
  as
    v_table varchar2(32);
  begin
    v_table := 'cache_d'||i_bostype||'t'||i_bostime;

    return 'select * from (select * from '||v_table||' union all
           select max(time), point1, point2,sum(cunt),sum(cunt1),sum(cunt2),sum(cunt3),sum(totallatency),max(maxlatency),min(minlatency) from '||v_table||'m group by point1, point2
           )' || i_timecond;
  end;

  -----------------------------------------------------------------------
  -- 描述:
  --   构造f类型缓存的sql语句
  -- 参数:
  --   @i_bostype:业务类型
  --   @i_bostime:时间类型
  --   @i_timecond:时间条件
  -- 返回值:
  --   返回进行缓存操作的SQL语句
  -----------------------------------------------------------------------
  function fn_compose_f_cache_sql(i_bostype number, i_bostime number, i_timecond varchar2) return varchar2
  as
    v_table varchar2(32);
  begin
    v_table := 'cache_f'||i_bostype||'t'||i_bostime;

    return 'select * from (select * from '||v_table||' union all
           select max(time),sum(totallatency),max(maxlatency),min(minlatency),sum(pcunt) from '||v_table||'
           ) '|| i_timecond;
  end;

 -----------------------------------------------------------------------
  -- 描述:
  --   缓存调用的入口
  -- 参数:
  --   @i_type:缓存类型
  --   @i_subtype:缓存子类型
  --   @i_starttime:数据开始时间
  -- 返回值:
  --   void
  -----------------------------------------------------------------------
  function fnsummarysql1(
    in_kpitype number,
    in_timetype number,
    in_time number,
    in_cunt0 number,
    in_traders number,
    in_paths number,
    in_limit1 number,
    in_limit2 number
  ) return varchar2
  as
    v_timetype number;
    v_from number;
  begin
    v_timetype := 0 ;
    if in_timetype = 0 then --当前一分钟
       v_from := in_time-59;
    elsif in_timetype = 1 then --当前5分钟
       v_from := in_time-299;
    elsif in_timetype = 2 then --当前1小时
       v_timetype := 1 ;
       v_from := in_time-3599;
    end if;

    return 'insert into TMP_CACHE_SUMMARY1 select '||in_kpitype||' as s, '||in_timetype||' as t, nvl('||in_cunt0||',0) as cunt0, nvl(a.cunt1,0) as cunt1,
            nvl(a.cunt2,0) as cunt2,nvl(a.cunt3,0) as cunt3,nvl(a.cunt,0) as cunt,'||in_traders||' as traders, '||in_paths||' as paths,
            nvl(a.minlatency, 0) as minlatency, nvl(a.avglatency,0) as avglatency, nvl(a.maxlatency,0) as maxlatency,
            '||in_limit1||' as limit1, '||in_limit2||' as limit2 from ( select sum(cunt1) as cunt1,sum(cunt2) as cunt2, sum(cunt3) as cunt3,sum(cunt) as cunt,
            min(minlatency)/1000 as minlatency,  sum(totallatency)/decode(sum(cunt),0,1,sum(cunt))/1000 as avglatency, max(maxlatency)/1000 as maxlatency
            from cache_a'||in_kpitype||'t'||v_timetype||'  where time between '||v_from||' and '||in_time||') a';
  end;

 function fnsummarysql2(
    in_kpitype number,
    in_time number
  ) return varchar2
  as
    v_wday number;
  begin
    v_wday := com.fngetweekday(in_time);
    return ' select '||in_kpitype||' as s, 3 as t, nvl(b.cunt0,0) as cunt0, nvl(a.cunt1,0) as cunt1,
              nvl(a.cunt2,0) as cunt2,nvl(a.cunt3,0) as cunt3,nvl(a.cunt,0) as cunt,c.traders as traders, d.paths as paths,
              nvl(a.minlatency, 0) as minlatency, nvl(a.avglatency,0) as avglatency, nvl(a.maxlatency,0) as maxlatency,
              e.limit1 as limit1, e.limit2 as limit2 from ( select sum(cunt1) as cunt1,sum(cunt2) as cunt2, sum(cunt3) as cunt3,sum(cunt) as cunt,
              min(minlatency)/1000 as minlatency, sum(totallatency)/greatest(sum(cunt),1)/1000 as avglatency, max(maxlatency)/1000 as maxlatency
              from cache_a'||in_kpitype||'t1) a, ( select sum(errordercount1sec) as cunt0 from fact_t0d'||v_wday||') b,
              ( select count(traderno) as traders from ( select distinct traderno from cache_a'||in_kpitype||'t1)) c,
              ( select count(point1) as paths from (select distinct point1 from cache_c'||in_kpitype||'t1)) d,
              ( select limit1/1000 as limit1,limit2/1000 as limit2 from cfg_latencylimit where point1=0 and point2=0 and kpitype ='||in_kpitype||') e';

  end;

  -----------------------------------------------------------------------
  -- 描述:
  --   进行某种业务的延迟概要缓存
  -- 参数:
  --   @in_s:业务类型
  -- 返回值:
  --   void
  -----------------------------------------------------------------------
  procedure dosummarycachenow(
    in_s number
  )
  as
    v_time number;
    v_limit1 number;
    v_limit2 number;
    v_wday number;
  begin
    select wday into v_wday from cache_time;--获取周期时间
    ---获取当前时间
    execute immediate 'select nvl(max(time-1), 0) from fact_i0d'||v_wday||' ' into v_time;
    execute immediate 'select limit1/1000 as limit1,limit2/1000 as limit2 from cfg_latencylimit where point1 = 0 and point2 = 0 and kpitype ='|| in_s into v_limit1,v_limit2;
  --select outpoint into v_pointout from cfg_iopoint where id = 1 ;
    execute immediate 'insert into CACHE_SUMMARYH select '||in_s||' as s, 0 as t, nvl(b.cunt0,0) as cunt0, nvl(a.cunt1,0) as cunt1,
              nvl(a.cunt2,0) as cunt2,nvl(a.cunt3,0) as cunt3,nvl(a.cunt,0) as cunt,c.traders as traders, d.paths as paths,
              nvl(a.minlatency, 0) as minlatency, nvl(a.totallatency,0) as avglatency, nvl(a.maxlatency,0) as maxlatency,'||v_limit1||' as limit1, '||v_limit2||' as limit2
              from (select sum(cunt1) as cunt1,sum(cunt2) as cunt2, sum(cunt3) as cunt3,sum(cunt) as cunt,min(minlatency)/1000 as minlatency, sum(totallatency)/greatest(sum(cunt),1)/1000 as totallatency, max(maxlatency)/1000 as maxlatency
              from cache_a'||in_s||'t0  where time between '||(v_time-59)||' and '||v_time||') a,
              (select sum(errordercount1sec) as cunt0 from fact_t0d'||v_wday||'  where time between '||(v_time-59)||' and '||v_time||' and point=140 ) b,
              (select count(distinct traderno) as traders from cache_a'||in_s||'t0  where time between '||(v_time-59)||' and '||v_time||' and traderno <>0 ) c,
              (select count(distinct point1) as paths from cache_c'||in_s||'t0  where time between '||(v_time-59)||' and '||v_time||' and point1>0 ) d';

    execute immediate 'insert into CACHE_SUMMARYH select '||in_s||' as s, 1 as t, nvl(b.cunt0,0) as cunt0, nvl(a.cunt1,0) as cunt1,
              nvl(a.cunt2,0) as cunt2,nvl(a.cunt3,0) as cunt3,nvl(a.cunt,0) as cunt,c.traders as traders, d.paths as paths,
              nvl(a.minlatency, 0) as minlatency, nvl(a.totallatency,0) as avglatency, nvl(a.maxlatency,0) as maxlatency,
              '||v_limit1||' as limit1, '||v_limit2||' as limit2 from (select sum(cunt1) as cunt1,sum(cunt2) as cunt2, sum(cunt3) as cunt3,sum(cunt) as cunt,
              min(minlatency)/1000 as minlatency, sum(totallatency)/greatest(sum(cunt),1)/1000 as totallatency, max(maxlatency)/1000 as maxlatency
              from cache_a'||in_s||'t0  where time between '||(v_time-299)||' and '||v_time||' ) a,
              (select sum(errordercount1sec) as cunt0 from fact_t0d'||v_wday||'  where time between '||(v_time-299)||' and '||v_time||'  and point=140) b,
              (select count(distinct traderno) as traders from cache_a'||in_s||'t0 where time between '||(v_time-299)||' and '||v_time||' and traderno<>0) c,
              (select count(distinct point1) as paths from cache_c'||in_s||'t0 where time between '||(v_time-299)||' and '||v_time||' and point1>0) d';

    execute immediate 'insert into CACHE_SUMMARYH select '||in_s||' as s, 2 as t, nvl(b.cunt0,0) as cunt0, nvl(a.cunt1,0) as cunt1,
              nvl(a.cunt2,0) as cunt2,nvl(a.cunt3,0) as cunt3,nvl(a.cunt,0) as cunt,c.traders as traders, d.paths as paths,
              nvl(a.minlatency, 0) as minlatency, nvl(a.totallatency,0) as avglatency, nvl(a.maxlatency,0) as maxlatency,
              '||v_limit1||' as limit1, '||v_limit2||' as limit2 from ( select sum(cunt1) as cunt1,sum(cunt2) as cunt2, sum(cunt3) as cunt3,sum(cunt) as cunt,
              min(minlatency)/1000 as minlatency, sum(totallatency)/greatest(sum(cunt),1)/1000 as totallatency, max(maxlatency)/1000 as maxlatency
              from cache_a'||in_s||'t0   where time between '||(v_time-3599)||' and '||v_time||' ) a,
              (select sum(errordercount1sec) as cunt0 from fact_t0d'||v_wday ||' where point=140 ) b,
              (select count(distinct traderno) as traders from cache_a'||in_s||'t0 where time between '||(v_time-3599)||' and '||v_time||' and traderno<>0) c,
              (select count(distinct point1) as paths from cache_c'||in_s||'t0  where time between '||(v_time-3599)||' and '||v_time||' and point1>0) d';
    commit;
   -- dbms_output.put_line(v_sql);
  end;
  -----------------------------------------------------------------------
  -- 描述:
  --   获取时延统计概要数据
  -- 参数:
  --   @out_result:输出数据
  -- 返回值:
  --   void
  -----------------------------------------------------------------------
  procedure getlatencysummary(
    out_result out sys_refcursor
  )
  as
  begin
    --清除缓存表

    execute immediate 'truncate table CACHE_SUMMARYH';
    execute immediate 'call com_bos.dosummarycachenow(0)'; --汇总一分钟的时延分布数据
    execute immediate 'call com_bos.dosummarycachenow(1)'; --汇总五分钟的时延分布统计
    execute immediate 'call com_bos.dosummarycachenow(2)'; --汇总一小时的时延分布统计

    open out_result for 'select s as "s",t as "t",cunt0 as "cunt0",cunt1 as "cunt1",cunt2 as "cunt2",cunt3 as "cunt3",cunt as "cunt",
         traders as "traders",paths as "paths",minlatency as "minlatency",avglatency as "avglatency",maxlatency as "maxlatency",
         limit1 as "limit1",limit2 as "limit2" from (select * from CACHE_SUMMARYH union all select * from CACHE_SUMMARY)';
    /*
    execute immediate 'truncate table TMP_CACHE_SUMMARY1';
    execute immediate 'call com_bos.dosummarycachenow(0)';
    execute immediate 'call com_bos.dosummarycachenow(1)';
    execute immediate 'call com_bos.dosummarycachenow(2)';

    open out_result for 'select * from TMP_CACHE_SUMMARY1 union all select * from TMP_CACHE_SUMMARY ';
    */
    EXCEPTION
    when OTHERS then
      dbms_output.put_line(sqlerrm);
  end;

  -----------------------------------------------------------------------
  -- 描述:
  --   获取时延随时间分布数据
  -- 参数:
  --   @out_result:输出数据
  --   @in_bostype:业务类型
  --   @in_bostime:时间类型
  --   @in_latencytype:延迟类型
  --   @in_delta:统计粒度
  --   @in_from:统计开始时间
  --   @in_to:统计结束时间
  -- 返回值:
  --   void
  -----------------------------------------------------------------------
  procedure getlatency(
    out_result out sys_refcursor,
    in_bostype number,
    in_bostime number,
    in_latencytype number,
    in_delta number,
    in_from number,
    in_to number
  )
  as
    v_sql varchar2(2000); -- 拼凑执行的sql
    v_timeregular varchar2(150);
    v_timecond varchar2(128); --时间条件
    v_select varchar(256); --查询的字段
    v_timeregular1 varchar2(150);--转换的时间格式
    v_currenttime number;--当前时间
    v_fromtime number;--开始时间
    v_wday number;--星期数
    v_facttable varchar2(128);--事实表
    v_to number;--结束时间
    --v_bostime number;
  begin

  if in_bostime > 2 then --当天昨天历史
     if in_delta = 1 then -- 1秒粒度 时间范围1分钟
         v_timeregular := com.fngetsecondtostrsql('time', 'hh24:mi:ss');
         v_timeregular1 := 'time';
         v_to := in_to ;
     elsif  in_delta = 60 then --1分钟粒度 时间范围30分钟
         v_timeregular := com.fngetsecondtostrsql('time', 'hh24:mi');
        v_timeregular1 := com.fngetsecondtostrsql('time', 'hh24:mi');
         v_to := in_to ;
     elsif  in_delta = 300 then --5分钟粒度 时间范围一天
         v_timeregular := com.fngetsecondtostrsql('min(time)', 'hh24:mi');
         v_timeregular1 := 'trunc(time/300)';
         v_to := in_to  ;
     elsif  in_delta = 3600 then
         v_timeregular := com.fngetsecondtostrsql('time', 'hh24');
         v_timeregular1 := com.fngetsecondtostrsql('time', 'hh24');
         v_to := in_to + 1;
     elsif  in_delta = 86400 then
         v_timeregular := com.fngetsecondtostrsql('time', 'mm-dd');
         v_timeregular1 :=com.fngetsecondtostrsql('time', 'mm-dd');
         v_to := in_to + 1;
     end if;
        -- 星期数
        v_wday := com.fngetweekday(in_from);
        --要查询的表
        v_facttable := 'fact_s'||in_bostype||'d'||v_wday;
        if in_latencytype = 0 then --最小时延
           v_select := 'nvl(min(globallatency),0)/1000 as "latency", nvl(count(id), 0) as "cunt"';
        elsif in_latencytype = 1 then --平均时延
           v_select := 'nvl(sum(globallatency)/greatest(count(id),1),0)/1000 as "latency", nvl(count(id), 0) as "cunt"';
        else --最大时延
           v_select := 'nvl(max(globallatency),0)/1000 as "latency", nvl(count(id), 0) as "cunt"';
        end if;

     v_timecond := ' where time between '||in_from||' and '||v_to||'';

  else -- 最近1小时 5分钟 1分钟
    select wday into v_wday from cache_time;
    execute immediate 'select nvl(max(time-1), 0) from fact_i0d'||v_wday||' ' into v_currenttime;
    if in_bostime = 0 then --1分钟
          v_timeregular1 := 'time';
          v_fromtime := v_currenttime - 59;
          v_timeregular := com.fngetsecondtostrsql('time', 'hh24:mi:ss');
    elsif in_bostime = 1 then --5分钟
          v_timeregular1 := 'trunc(time/5)';
          v_fromtime := v_currenttime - 299;
          v_timeregular := com.fngetsecondtostrsql('min(time)', 'hh24:mi:ss');
    elsif in_bostime = 2 then --1小时
          v_timeregular1 := com.fngetsecondtostrsql('time', 'hh24:mi');
          v_fromtime := v_currenttime - 3599;
          v_timeregular := com.fngetsecondtostrsql('time', 'hh24:mi');
    end if;

    v_facttable := 'cache_a'||in_bostype||'t0';
    if in_latencytype = 0 then --最小时延
         v_select := 'nvl(min(minlatency),0)/1000 as "latency", nvl(sum(cunt),0) as "cunt"';
    elsif in_latencytype = 1 then --平均时延
         v_select := 'nvl(sum(totallatency)/greatest(sum(cunt),1),0)/1000 as "latency", nvl(sum(cunt), 0) as "cunt"';
    else --最大时延
         v_select := 'nvl(max(maxlatency),0)/1000 as "latency", nvl(sum(cunt), 0) as "cunt"';
    end if;
    v_timecond := ' where time between ' || v_fromtime || ' and ' || v_currenttime;

  end if;

   v_sql := 'select '||v_timeregular||' as "time", '||v_select||' from '||v_facttable||' '||v_timecond||' group by '||v_timeregular1||' order by 1';

  -- insert into debug_log values(v_sql);commit;
   open out_result for v_sql;

   EXCEPTION
    when OTHERS then
      dbms_output.put_line(sqlerrm);
  end;
end com_bos;


版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

oracle创建简单的包

--规范 create or replace package test_pkg is --test_pkg为包名 procedure showMessage; --声明一个过程 function ...

oracle创建包 含存储过程和函数

create table my_toys (     id varchar2(5),      name varchar2(20),      price number ); --插入测试...
  • wdyr321
  • wdyr321
  • 2013年09月18日 00:25
  • 1044

oracle 包和包体的创建

实例5: 创建包: --创建一个包sp_package --声明该包有一个过程update_sal --声明该包有一个函数annual_income create package sp_pa...

ORACLE package包中的存储过程的定义和使用

最近的项目中用到了oracle package包中的存储过程。本文以一个简单的插入为例,简述从存储过程的定义,包括PACKAGE的定义和PACKAGE BODY的定义,到存储过程的使用。 首先用sql...
  • rlanffy
  • rlanffy
  • 2014年05月29日 17:24
  • 2486

oracle 创建包和存储过程并调用举例

--规范   create or replace package test_pkg is  --test_pkg为包名   procedure showMessage;  --声明一个过程   ...
  • gc_cg
  • gc_cg
  • 2017年03月05日 19:31
  • 670

Oracle包体,包含存储过程,自定义函数(function),自定义类型(table),用函数返回自定义类型(相当于返回一张表)

供参考: CREATE OR REPLACE PACKAGE PACKXINEM8GL IS TYPE M_REFCURSM IS REF CURSOR; /*******************...
  • lychaox
  • lychaox
  • 2011年09月21日 11:59
  • 2381

Oracle package包头和package body包体例子

本文系转载,原文地址:http://blog.itpub.net/26435490/viewspace-1078212/ 一 包的组成 包头(package):包头部分...
  • NK_TF
  • NK_TF
  • 2016年01月19日 22:03
  • 5907

Oracle 批量insert报错处理

你可能会碰到这样的业务,大批量插入数据,但可能有一两条数据有问题,导致插入失败,回滚就太不划算了。可以使用insert的一个特殊属性,如下面的例子。  SQL> select * from v$ver...

Oracle中以insert values的形式同时插入多条记录

由于要做测试数据插oracle数据库,想到了mysql的多个values的形式,但是sql报错。oracle并不支持这种一个insert into 多个values的方法 INSERT INTO...

Oracle查询用户所有的表、包、包体、过程、函数等信息

-- 查询所有用户的表,视图等 select * from all_tab_comments    -- 查询本用户的表,视图等 select * from user_tab_comment...
  • yixh1
  • yixh1
  • 2013年12月06日 14:17
  • 461
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:ORACLE创建包和包体及包中函数和存储过程
举报原因:
原因补充:

(最多只允许输入30个字)