代码:
declare cursor c_job is select ename, sal from emp; c_row c_job%rowtype;begin for c_row in c_job loop dbms_output.put_line('姓名:' || c_row.ename || ' 工资:' || c_row.sal); end loop;end;
结果: