表:
----游标-----------------------------
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;
/