below is the example:
DECLARE
CURSOR dept_cur
IS
SELECT deptno
FROM dept
ORDER BY deptno;
CURSOR emp_cur (v_dept_no DEPT.DEPTNO%TYPE)
IS
SELECT ename
FROM emp
WHERE deptno = v_dept_no;
BEGIN
FOR dept_rec IN dept_cur LOOP
dbms_output.put_line('Employees in Department '||TO_CHAR(dept_rec.deptno));
FOR emp_rec in emp_cur(dept_rec.deptno) LOOP
dbms_output.put_line('...Employee is '||emp_rec.ename);
END LOOP;
END LOOP;
END;