BEGIN
FOR emp_satz IN (
SELECT
empno,
ename,
sal
FROM
scott.emp
WHERE
job = 'SALESMAN'
) LOOP
dbms_output.put_line(emp_satz.empno
|| ' '
|| emp_satz.ename
|| ' '
|| emp_satz.sal);
END LOOP;
END;
/
REM Ausgabe:
7499 ALLEN 1600
7521 WARD 1250
7654 MARTIN 1250
7844 TURNER 1500