我已經嘗試了下面的代碼來打印每個或一些細節的基礎上,我從光標得到的價值,但我不能,任何人都可以幫助我嗎?如何從pl/sql光標打印值?
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;
TYPE cust_dept IS RECORD (dept_id dept.department_id%type, dept_name dept.department_name%type, emp_name emp.first_name%type); 這是我保存數據的記錄。我對不對? –
但仍然是編譯錯誤 –
那麼你如何顯示數據 – user2001117