Declarar Cursores

declare cursor cpaises
is
select codpa,nompa,conpa from paises;
copa number(3);
nopa varchar2(20);
contpa varchar2(10);
begin
  open cpaises;
  loop
   fetch cpaises into copa,nopa,contpa;
   exit when cpaises%notfound;
   dbms_output.put_line(cpaises%rowcount||' pais '||nopa);
  end loop;
  close cpaises;
end;

Share this

Related Posts

Previous
Next Post »

Buscar en Wikipedia

Resultados de la búsqueda