隐示游标:
不用明确建立游标变量,分两种:
1.在PL/SQL中使用DML语言,使用ORACLE提供的名为SQL的隐示游标
2.CURSOR FOR LOOP
1举例:
declare
begin
update departments set department_name=department_name
where 1=2;

dbms_output.pub_line(‘update ‘|| sql%rowcount ||’ records’);
end;
/2举例:
declare
begin
for my_cursor in ( select department_name, department_id from departments)
loop
dbms_output.pub_line(my_cursor.department_id || ‘ : ’ my_cursor.department_name);
end;
/游标属性:
%FOUND
%NOTFOUND
%ROWCOUNT
%ISOPEN