在pl/sql中这样写: declare cursor d_cursor is select * from all_users; dept d_cursor%rowtype; begin open d_cursor; loop exit when d_cursor%notfound; fetch d_cursor into dept; dbms_output.put_line(dept.dept_name||dept.hh||dept.dept_id);---列出字段名 end loop; close d_cursor; end; /
declare
cursor d_cursor is select * from all_users;
dept d_cursor%rowtype;
begin
open d_cursor;
loop
exit when d_cursor%notfound;
fetch d_cursor into dept;
dbms_output.put_line(dept.dept_name||dept.hh||dept.dept_id);---列出字段名
end loop;
close d_cursor;
end;
/