本文共 666 字,大约阅读时间需要 2 分钟。
??PLSQL????????????
???????PLSQL??????????????????????????????????????PLSQL?????????????????????
??????????????
Type ref_cur_variable IS REF cursor;cur_variable ref_cur_variable;v_empno scott.emp.empno%type;v_ename scott.emp.ename%type;v_sql varchar2(100) := 'select t.empno, t.ename from scott.emp t';
??????????cursor?
Open cur_variable For v_sql;
?????????????????
Loop fetch cur_variable Into v_empno, v_ename; Exit When cur_variable%NotFound; dbms_output.put_line(cur_variable%rowcount || ' - ' || v_empno || ' ' || v_ename);End Loop;
?????cursor?
Close cur_variable;
?????????????????PLSQL?????????????????????????????????????????????????????????
转载地址:http://xvpfk.baihongyu.com/