摘要:
/* 游标 cursor */
declare cursor c is --声明游标时并不从数据库查询数据 select * from emp ; v_emp c%rowtype;
begin open c; --open游标才真正的查询数据保存到内存 loop fetch c into v_emp; exit when (c%notfound); dbms_output.put_line(v_emp.ename); end loop; close c; --关闭游标
end;
/ declare cursor c ... 阅读全文