是系统为用户开设的一个数据缓冲区,存放SQL语句的执行结果,可以理解为PL/SQL中的结果集
声明游标
cusor 游标名称 is SQL语句;
使用游标
open 游标名称loopfetch 游标名称 into 变量exit when 游标名称%notfoundend loop;close 游标名称
ex:
declare
v_pricetable T_PRICETABLE%rowtype;-- 价格行对象
cursor cur_pricetable is select * from T_PRICETABLE where
ownertypeid=1;-- 定义游标
begin
