日期:2014-05-20 浏览次数:20709 次
create or replace procedure pro_select ( v_no in number, v_name out varchar2, v_loc out varchar2 ) as cursor1 sys_refcursor; sqlstr varchar(100); begin sqlstr := 'select dname,loc from dept where deptno=' || v_no; open cursor1 for sqlstr; loop fetch cursor1 into v_name,v_loc; if cursor1%notfound then exit; end if; end loop; end pro_select;
------解决方案--------------------