CREATE OR REPLACE PROCEDURE get_EmpData
IS
-- Cursor deklarieren
CURSOR c_emp
IS
SELECT ename
, job
, sal
FROM emp
ORDER BY job;
-- Variablen deklarieren
v_erg VARCHAR2(3000) := NULL;
BEGIN
FOR i IN c_emp
LOOP
v_erg := i.ename ||',' || i.job ||',' || i.sal;
dbms_output.put_line(v_erg);
END LOOP;
END get_EmpData;
Keine Kommentare:
Kommentar veröffentlichen