oracle 存储过程使用游标返回结果集和游标的两种for循环
摘要:
游标定义和使用需要4个步骤:1、声明游标 myCur Sys_Refcursor;2、打开游标 open myCur for select * from students;3、提取数据 可以使用fetch也可以使用for循环;4、关闭游标 close myCur;fetch myCur into name,age;exit when myCur%NOTFOUND; if myCur%found then dbms_output.put_line('读取的数据:学生姓名为:' ||name || '元, 年龄为: ' ||age); end if; end loo 阅读全文
posted @ 2013-04-12 16:18 sindy's space 阅读(5007) 评论(0) 推荐(0) 编辑