ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 07-14 cursor variable

07-14 cursor variable

原创 Linux操作系统 作者:wuxidba 时间:2010-07-14 16:08:03 0 删除 编辑
declare
        type emp_type is ref cursor return emp%rowtype;
        cur_emp emp_type;
        row_emp emp%rowtype;
       
begin
 
       open cur_emp for select * from emp;
       loop
           fetch cur_emp into row_emp;
           dbms_output.put_line(row_emp.name);
           exit when cur_emp%notfound;
       end loop;
       close cur_emp;
end;

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/23895263/viewspace-668001/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: pl/sql 07-13
请登录后发表评论 登录
全部评论

注册时间:2010-05-12

  • 博文量
    64
  • 访问量
    73601