zoukankan      html  css  js  c++  java
  • oracle pl/sql 中 使用包

    模式:

    create or replace package 包名 is

      定义变量
      函数声明

      过程声明
    end 包名;
    /
    show err;

    create or replace package body 包名 is 

      函数定义

      过程定义

    end 包名;
    /
    show err;

    举例:

    create or replace package pck_report_getconreportdata is
     -- 函数声明
     function getActiveIsbastaus(p_id number,p_type number) return varchar2; -- 判断业务是否在统计范围,获取业务的时间(用于统计的时间)
     -- 过程声明
     procedure proc_CreateConreportData(p_type number,p_rptno number,p_stanid number,p_id number,p_createtype number,p_executeflag out number); 

     procedure proc_CreateAllConreportData(p_type number);

    end pck_report_getconreportdata;
    /
    show err;

    create or replace package body pck_report_getconreportdata is
     function getActiveIsbastaus(p_id number,p_type number) return varchar2
     is

      ...

     begin

      ...

     end getActiveIsbastaus;

     ......

    end pck_report_getconreportdata;
    /
    show err; 

  • 相关阅读:
    MySQL主从半同步复制
    MySQL主从之延时复制
    MySQL备份
    MySQL主从介绍及搭建(异步复制)
    MySQL物理备份Xtrabackup
    MySQL数据库误删除数据恢复
    MySQL--日志
    JAVA日报
    JAVA日报
    JAVA日报
  • 原文地址:https://www.cnblogs.com/BradMiller/p/1744008.html
Copyright © 2011-2022 走看看