EjemplosDuoc.es.tl
  Cursor Oracle
 
 


Procedimiento con un cursor interno.

create or replace procedure Hol(deko varchar2) is
      cursor Ho is SELECT deko,length(deko) as can from valor;
      dato Ho%rowtype;
      var number;
      begin
        open Ho;
        loop
          fetch Ho into dato;
          exit when Ho%notfound;
          var:=dato.can;
          if(var>=5) then
             var:=var*var;
          end if;
          dbms_output.put_line(dato.deko||' '|| to_char(var));
        end loop;
      close Ho;
    end;


Ejemplo por Burbuja.6385


 
   
 
Este sitio web fue creado de forma gratuita con PaginaWebGratis.es. ¿Quieres también tu sitio web propio?
Registrarse gratis