当前位置:Gxlcms > 数据库问题 > Oracle 学习----游标(使用无参光标cursor)

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

时间:2021-07-01 10:21:17 帮助过:24人阅读

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)

标签:ora   游标   etc   bms   .com   ima   declare   使用   alt   

人气教程排行