5.2游标 declare v_sno s.sno%type; v_sname s.sname%type; cursor c1 is select sno,sname from s where sdept:='信息'; begin open c1; loop fetch c1 into v_sno,v_sname; exit when c1%notfound; dbms_output.put_line(v_snoll'--v_sname); end loop; close c1; end; 5.2 游标 declare v_sno s.sno%type; v_sname s.sname%type; cursor c1 is select sno,sname from s where sdept='信息'; begin open c1; loop fetch c1 into v_sno,v_sname; exit when c1%notfound; dbms_output.put_line(v_sno||'---'||v_sname); end loop; close c1; end;