我已经尝试使用以下代码根据从光标获得的值打印每个或某些细节,但我不能,有人可以帮助我吗?
set serveroutput on
declare
d_id number;
temp_tab VARRAY;
cursor c1 is select * from(select d.department_ID, `enter code here`d.department_name,count(d.department_name) cnt from employees e,departments d where e.department_id=d.department_id group by d.department_ID, d.department_name) where cnt>=5;
begin
open c1;
for i in c1
loop
select e.first_name,d.department_id,d.department_name into temp_tab from employees e,departments d where d.department_id=i.department_ID;
end loop;
close c1;
end;