PROCEDURE P_EMP_CURSOR ( in_last_name IN varchar2 ) IS cursor get_emp(p_last_name varchar2) is select * from bonus where last_name = p_last_name; BEGIN for emp_rec in get_emp(in_last_name) loop dbms_output.put_line(emp_rec.first_name||' '||emp_rec.last_name); end loop; END;