标签:
declare Type ref_cur_emp IS REF CURSOR RETURN scott.emp%RowType; cur_emp ref_cur_emp; rec_emp cur_emp%RowType; v_sql varchar2(100) := ‘select * from scott.emp t‘; begin -- xxx Open cur_emp For v_sql; Open cur_emp For select * from scott.emp t; Loop fetch cur_emp InTo rec_emp; Exit When cur_emp%NotFound; dbms_output.put_line(cur_emp%rowcount || ‘ -> ‘ || rec_emp.empno || ‘ ‘ || rec_emp.sal); End Loop; Close cur_emp; end;
Oracle PLSQL Demo - 15.强类型REF游标[预先指定查询类型与返回类型]
标签:
原文地址:http://www.cnblogs.com/nick-huang/p/4609100.html