惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
Check Point Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 聂微东
月光博客
月光博客
博客园 - 司徒正美
爱范儿
爱范儿
aimingoo的专栏
aimingoo的专栏
量子位
Recent Announcements
Recent Announcements
V
V2EX
P
Proofpoint News Feed
小众软件
小众软件
云风的 BLOG
云风的 BLOG
腾讯CDC
宝玉的分享
宝玉的分享
Microsoft Azure Blog
Microsoft Azure Blog
大猫的无限游戏
大猫的无限游戏
Vercel News
Vercel News
The GitHub Blog
The GitHub Blog
A
About on SuperTechFans
B
Blog
博客园_首页
GbyAI
GbyAI
博客园 - Franky

博客园 - 东方新秀

Unix系统启动时进程介绍 Oracle定期运行数据 linux下如何用脚本实现自动ftp linux shell 自动处理ftp操作探讨 linux shell 自动处理ftp操作探讨 从Oracle数据库中导出SQL脚本 crontab无法正常运行的原因分析 手工创建Oracle数据库脚本及说明(转载) 利用Crontab实现对Oracle数据库的定时备份(转载) 一个不错了健康知识网 Oracle学习 国人开发的异构数据库(Java实现的数据库) 2007年7月最受关注的20篇技术文章!(转载本文,请注明出处为CSDN) 英语在线词典 oracle帮助文档 查离有效期至多只有七天的商品的商品 Oracle分页存储过程(转) oracle日期处理 Oracle求求空间使用情况
Oracle学习之二(用游标解决数组问题)
东方新秀 · 2007-08-12 · via 博客园 - 东方新秀

CREATE OR REPLACE PROCEDURE abcde(mgr in number)
as
  type t_pubapplyrow  is record(
  v_empno  number(4),
  v_ename  varchar2(10)
 );
  v_mgr emp.mgr%type;
  type cur_test is ref cursor;
  emp_cur cur_test;
  v_var t_pubapplyrow;
BEGIN
  v_mgr:=mgr;
  OPEN emp_cur FOR  select empno,ename from emp where  mgr in(select distinct mgr from emp);
  loop
  fetch emp_cur into v_var;
  exit when emp_cur%notfound;
  insert into temp_tbl(empno,ename) values(v_var.v_empno,v_var.v_ename);
  end loop;
  close  emp_cur;
  commit;
exception
 when others then
 rollback;
end;