2、编写一个程序块,将emp表中前5人的名字

declare cursor s1 is select * from emp;
v_res emp%rowtype;
begin
  open s1;
  fetch s1 into v_res;
   for a in 1..5 loop
     dbms_output.put_line(v_res.ename);
  fetch s1 into v_res;
   end loop;
close s1;

end;

猜你喜欢

转载自blog.csdn.net/weixin_42121296/article/details/80571643