SET SERVEROUTPUT ON
DECLARE
CURSOR emp_curs (
p_comm IN NUMBER
) IS
SELECT
*
FROM
scott.emp
WHERE
comm = p_comm
OR ( comm IS NULL
AND p_comm IS NULL );
BEGIN
FOR rec_curs IN emp_curs(0) LOOP
dbms_output.put_line('Name=' || rec_curs.ename);
END LOOP;
END;
/
rem ausgabe :
name = turner