ORACLE中的数据包的使用
来源:互联网 发布:新青山软件 编辑:程序博客网 时间:2024/05/20 05:28
/*数据包(我们可以把相关的函数,过程,类型,
变量放入一个数据包中,可以实现公共变量,
过程函数对自定义类型的使用)*/
--数据包的说明部分
create or replace package mypack
as
type mytype is ref cursor return emp%rowtype;
function myemp(dno number) return mytype;
end;
/
--数据包的主体部分
create or replace package body mypack
as
function myemp(dno number) return mytype
as
eee mytype;
begin
open eee for select * from emp where deptno=dno;
return eee;
end myemp;
end mypack;
/
--如何调用 数据包名.(方法名/类型名)
declare
e mypack.mytype;
eee emp%rowtype;
begin
e:=mypack.myemp(20);
loop
fetch e into eee;
exit when (e%notfound);
dbms_output.put_line(eee.empno||','||eee.ename||','||eee.job);
end loop;
end;
/
变量放入一个数据包中,可以实现公共变量,
过程函数对自定义类型的使用)*/
--数据包的说明部分
create or replace package mypack
as
type mytype is ref cursor return emp%rowtype;
function myemp(dno number) return mytype;
end;
/
--数据包的主体部分
create or replace package body mypack
as
function myemp(dno number) return mytype
as
eee mytype;
begin
open eee for select * from emp where deptno=dno;
return eee;
end myemp;
end mypack;
/
--如何调用 数据包名.(方法名/类型名)
declare
e mypack.mytype;
eee emp%rowtype;
begin
e:=mypack.myemp(20);
loop
fetch e into eee;
exit when (e%notfound);
dbms_output.put_line(eee.empno||','||eee.ename||','||eee.job);
end loop;
end;
/
- ORACLE中的数据包的使用
- 对于数据包的截取,使用linux中的netfilter钩子函数
- 对于数据包的截取,使用linux中的netfilter钩子函数
- oracle 数据包
- 使用 IRPStackSize指定I/O 请求数据包 (IRP) 中的堆栈位置的数目
- TI 的 smartconfig 中的数据包分析
- oracle中的MERGE的使用
- oracle中的decode的使用
- oracle中的decode的使用
- oracle中的decode的使用
- oracle中的decode的使用
- oracle中的decode的使用
- oracle中的decode的使用
- Oracle中的包的使用
- oracle中的decode的使用
- oracle中的decode的使用
- oracle中的decode的使用
- oracle中的decode的使用
- curl简单介绍
- ASP.NET数据库连接字符串的加密与解密
- 二叉树根结点到任意结点的路径
- 苍白的人生不需要解释
- 【转】编程常用软件下载及破解
- ORACLE中的数据包的使用
- javacode.cn公告
- 面向对象分析与设计
- 情感小故事
- 《时间管理》培训笔记
- asp.net中下载文件的实现方法
- 框架网页制作
- Silverlight群建立了,欢迎加入SilverlightQQ群!
- C#里的InputBox