declare
type emp_record is record(f_name employees.first_name%type,h_date employees.hire_date%type);
v_emp_record emp_record;
cursor c3(dept_id number,j_id varchar2) return emp_record
is
select first_name,hire_date from employees where department_id=dept_id and job_id=j_id;
begin
open c3(j_id=>'AD_VP',dept_id=>90);
loop
fetch c3 into v_emp_record;
if c3%found then
dbms_output.put_line(v_emp_record.f_name||'的雇用日期是:'||v_emp_record.h_date);
else
dbms_output.put_line('已经处理完结果集');
exit;
end if;
end loop;
close c3;
end;
蛊毒传说
芜湖不芜
UYOU
随时随地看视频慕课网APP