declare--- 声明
v_ename employees.last_name%type;
v_sal employees.salary% type;
cursor c_cursor is select last_name,salary from employees where DEPARTMENT_ID<100 and rownum<5;---定义游标
begin
open c_cursor;
fetch c_cursor into v_ename,v_sal;----提取游标内容
while c_cursor %found loop----为什么要%found
dbms_output.put_line(v_ename||'---'||to_char(v_sal));
fetch c_cursor into v_ename,v_sal;
end loop;
close c_cursor;
end;