• 包和包体简介


    包和包体的定义是分开的,
    包中存储的是声明,
    包体中存储的是存储过程的实现
     
    举例:查询某个部门中的所有员工信息  ---> 返回集合
     
    包头
     
    CREATE OR REPLACE PACKAGE MYPACKAGE AS
     
      type empcursor is ref cursor; //自定义一个集合类型
      procedure queryEmpList(dno in number,empList out empcursor);
     
    END MYPACKAGE;
     
     
    包体
    CREATE OR REPLACE PACKAGE BODY MYPACKAGE AS
                   //将集合类型的参数作为out参数传入
      procedure queryEmpList(dno in number,empList out empcursor) AS
      BEGIN
     
        open empList for select * from emp where deptno=dno;
     
      END queryEmpList;
     
    END MYPACKAGE;
  • 相关阅读:
    python面向对象开发
    python迭代器和生成器
    python 集合
    python 字典
    python 元组
    python列表
    python字符串方法
    dom节点操作
    vue 跨域配置代理 get/post 请求
    Vuecli版本调整
  • 原文地址:https://www.cnblogs.com/anzhi/p/7568256.html
Copyright © 2020-2023  润新知