set serveroutput on. declare varno varchar2(20). varprice varchar2(20).
CURSOR mycur(vartype number) is 0select emp_no,emp_zc from cus_emp_basic where com_no = vartype. begin
if mycur%isopen = false then
open mycur(000627). end if. fetch mycur into varno,varprice. while mycur%found loop dbms_output.put_line(varno||’,’||varprice). if mycur%rowcount=2 then exit. end if. fetch mycur into varno,varprice.