create or replace procedure apps.proc_select ( s_sid in number, s_sid2 in number, s_sname out text.sname%type, s_school out text.school%type ) is begin for v_cur in (select sname,school into s_sname,s_school from text where sid >=s_sid and sid <= s_sid2) loop dbms_output.put_line('s_sname:'||v_cur.sname||'s_school:'||v_cur.school); end loop; exception when no_data_found then dbms_output.put_line('该部门编号不存在'); end proc_select; ---这个是存储过程 |