日期:2014-05-17 浏览次数:20824 次
declare cursor is mycursor1 select ename,sal from emp; v_ename emp.ename%type; v_sal emp.sal%type; begin open mycursor1; loop fetch mycursor1 into v_ename,v_sal; exit when mycursor1%notfound; dbms_output.put_line('姓名:'||v_ename||',工资:'||v_sal); end loop; close mycursor1; end; /