当前位置:网站首页 > 技术博客 > 正文

oracle游标的用法



declare --强类型的游标类型 type strong_cursor_type is ref cursor return emp%rowtype; --弱类型的游标类型 type weak_cursor_type is ref cursor; --变量定义  strong_cursor strong_cursor_type; weak_cursor weak_cursor_type; v_emp emp%rowtype; begin open strong_cursor for select * from emp; loop fetch strong_cursor into v_emp; exit when strong_cursor%notfound; dbms_output.put_line(v_emp.empno || '-' || v_emp.ename); end loop; close strong_cursor; open weak_cursor for '&sql'; loop fetch weak_cursor into v_emp; exit when weak_cursor%notfound; dbms_output.put_line(v_emp.empno || '-' || v_emp.ename); end loop; close weak_cursor; end;

  • 上一篇: vue实现滑动验证
  • 下一篇: 备忘录设计图
  • 版权声明


    相关文章:

  • vue实现滑动验证2025-07-06 13:30:05
  • 上传文件 springboot2025-07-06 13:30:05
  • mfc开源项目2025-07-06 13:30:05
  • 二叉树遍历解题技巧2025-07-06 13:30:05
  • 国产数据库清单2025-07-06 13:30:05
  • 备忘录设计图2025-07-06 13:30:05
  • 峰值信噪比是什么意思2025-07-06 13:30:05
  • win10流量监控在哪2025-07-06 13:30:05
  • 电脑自带硬件检测系统2025-07-06 13:30:05
  • Date日期函数2025-07-06 13:30:05