Oracle PLSQL Demo - 08.定义显式游标[Define CURSOR, Open, Fetch, Close CURSOR]
2015-06-29 22:53
441 查看
declare v_empno scott.emp.empno%type; v_sal scott.emp.sal%type; cursor cur_emp is select t.empno, t.sal from scott.emp t; begin open cur_emp; loop fetch cur_emp into v_empno, v_sal; exit when cur_emp%notfound; dbms_output.put_line(v_empno || ' ' || v_sal); end loop; close cur_emp; end;
相关文章推荐
- Oracle PLSQL Demo - 03.流程判断[IF ELEIF ELSE]
- Oracle PLSQL Demo - 02.SELECT INTO单行赋值[SELECT INTO variables]
- Oracle PLSQL Demo - 01.定义变量、打印信息
- oracle exp/imp和sqlload
- oracle存储过程基本语法
- Oracle基础(三)数据库管理
- Java向Oracle数据库插入时间
- Oracle基础(二)---操作命令
- 检测ORACLE方法汇总数据块损坏
- Oracle数据库PL/SQL存储过程游标触发器
- Solaris10 swap空间管理
- 使用log miner 分析oracle日志 推荐
- Oracle 序列 每天 重建
- Oracle表分区合并
- oracle合并查询
- oracle合并查询
- Oracle 避免在查询中使用函数
- oracle合并查询
- oracle合并查询
- Oracle创建新用户的相关操作及问题