Oracle 学习----游标(使用无参光标cursor)

Posted 阿Q啊

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Oracle 学习----游标(使用无参光标cursor)相关的知识,希望对你有一定的参考价值。

表:

 

----游标-----------------------------

declare
  cursor tt is select name,sal from temp;
  vname temp.name%type;
  vsal temp.sal%type;
begin
  open tt;
  loop
    fetch tt into vname,vsal;
    exit when tt%notfound;
    dbms_output.put_line(vname||\'-----\'||vsal);
  end loop;
  close tt;
end;
/

 

以上是关于Oracle 学习----游标(使用无参光标cursor)的主要内容,如果未能解决你的问题,请参考以下文章