How declare another cursor inside cursor c_employees?
Note: cursor c_employees return employees_id and this id pass to other cursor in the where clause.
For example
cursor c_employees
is
Select employees_id from employees;
begin
for e in c_employees loop
begin
--How here define other cursor from cursor_employees I get employees_id and put as parameter.
cursor c_leaves is Select hours from my_table where employees_id = e.employees_id;
for j in c_leaves loop
begin
Insert into table2(......
end;
end loop;