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

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
云风的 BLOG
云风的 BLOG
Microsoft Security Blog
Microsoft Security Blog
WordPress大学
WordPress大学
GbyAI
GbyAI
C
Check Point Blog
M
MIT News - Artificial intelligence
T
The Blog of Author Tim Ferriss
Jina AI
Jina AI
博客园 - 【当耐特】
U
Unit 42
月光博客
月光博客
腾讯CDC
Y
Y Combinator Blog
小众软件
小众软件
博客园_首页
Last Week in AI
Last Week in AI
酷 壳 – CoolShell
酷 壳 – CoolShell
The GitHub Blog
The GitHub Blog
博客园 - 聂微东
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MongoDB | Blog
MongoDB | Blog
博客园 - Franky
T
Tailwind CSS Blog

博客园 - 东方新秀

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-11 · via 博客园 - 东方新秀

CREATE OR REPLACE PROCEDURE proc_emp(mgr in number)
is
  sqlstr varchar2(800);
  v_mgr emp.mgr%type;
  type cur_test is ref cursor;
  emp_cur cur_test;
  v_empno number(4);
  v_ename varchar2(10);
  --temp_tbl table%type (EMPNO number(4),ENAME VARCHAR2(10));
  --tbl_temp table(empno emp.empno%type,ename emp.ename%type);
BEGIN
  --create table tbl_temp(empno emp.empno%type,ename emp.ename%type); 
  --create table  temp_tbl(EMPNO number(4),ENAME VARCHAR2(10));
  --select distinct mgr from emp where mgr like '7%';
  v_mgr :=mgr;
  sqlstr:='select empno,ename From emp where mgr='|| v_mgr|| '';
  OPEN emp_cur FOR sqlstr;
 
 FETCH emp_cur INTO v_empno,v_ename;
 insert into temp_tbl(empno,ename) values(v_empno,v_ename);
--If (emp_cur%NOTFOUND) Then
--EXIT;
--End if;
--Result := Result || name_temp || ',';
close emp_cur;
END;

posted on 2007-08-11 13:42  东方新秀  阅读(216)  评论()    收藏  举报