CURSORES EN ORACLE

Páginas: 7 (1649 palabras) Publicado: 18 de febrero de 2015
CURSORES
WHILE LOOP
declare
cursor c_clientes is
select * from clientes;

registro_clientes c_clientes%rowtype;
begin
open c_clientes;
fetch c_clientes into registro_clientes;
while c_clientes%FOUND loop
DBMS_OUTPUT.put_line('EL cliente es: ' || registro_clientes.nombre_cliente);
fetch c_clientes into registro_clientes;
end loop;
close c_clientes;
end;LOOP – EXIT WHEN (DO WHILE)
declare
cursor c_clientes is
select * from clientes;
registro_clientes c_clientes%rowtype;
begin
open c_clientes;
loop
fetch c_clientes into registro_clientes;
EXIT WHEN c_clientes%NOTFOUND;
DBMS_OUTPUT.put_line('EL cliente es: ' || registro_clientes.nombre_cliente);
end loop;
close c_clientes;
end;
FOR
declare
cursorc_clientes is
select * from clientes;
begin
for i in c_clientes loop
DBMS_OUTPUT.put_line('EL cliente es: ' || i.nombre_cliente);
end loop;
end;

CURSORES
WHILE LOOP
declare
cursor c_clientes is
select * from clientes;

registro_clientes c_clientes%rowtype;
begin
open c_clientes;
fetch c_clientes into registro_clientes;
while c_clientes%FOUND loopDBMS_OUTPUT.put_line('EL cliente es: ' || registro_clientes.nombre_cliente);
fetch c_clientes into registro_clientes;
end loop;
close c_clientes;
end;

LOOP – EXIT WHEN (DO WHILE)
declare
cursor c_clientes is
select * from clientes;
registro_clientes c_clientes%rowtype;
begin
open c_clientes;
loop
fetch c_clientes into registro_clientes;
EXIT WHENc_clientes%NOTFOUND;
DBMS_OUTPUT.put_line('EL cliente es: ' || registro_clientes.nombre_cliente);
end loop;
close c_clientes;
end;
FOR
declare
cursor c_clientes is
select * from clientes;
begin
for i in c_clientes loop
DBMS_OUTPUT.put_line('EL cliente es: ' || i.nombre_cliente);
end loop;
end;
CURSORES
WHILE LOOP
declare
cursor c_clientes is
select * fromclientes;

registro_clientes c_clientes%rowtype;
begin
open c_clientes;
fetch c_clientes into registro_clientes;
while c_clientes%FOUND loop
DBMS_OUTPUT.put_line('EL cliente es: ' || registro_clientes.nombre_cliente);
fetch c_clientes into registro_clientes;
end loop;
close c_clientes;
end;

LOOP – EXIT WHEN (DO WHILE)
declare
cursor c_clientes is
select *from clientes;
registro_clientes c_clientes%rowtype;
begin
open c_clientes;
loop
fetch c_clientes into registro_clientes;
EXIT WHEN c_clientes%NOTFOUND;
DBMS_OUTPUT.put_line('EL cliente es: ' || registro_clientes.nombre_cliente);
end loop;
close c_clientes;
end;
FOR
declare
cursor c_clientes is
select * from clientes;
begin
for i in c_clientesloop
DBMS_OUTPUT.put_line('EL cliente es: ' || i.nombre_cliente);
end loop;
end;
CURSORES
WHILE LOOP
declare
cursor c_clientes is
select * from clientes;

registro_clientes c_clientes%rowtype;
begin
open c_clientes;
fetch c_clientes into registro_clientes;
while c_clientes%FOUND loop
DBMS_OUTPUT.put_line('EL cliente es: ' || registro_clientes.nombre_cliente);fetch c_clientes into registro_clientes;
end loop;
close c_clientes;
end;

LOOP – EXIT WHEN (DO WHILE)
declare
cursor c_clientes is
select * from clientes;
registro_clientes c_clientes%rowtype;
begin
open c_clientes;
loop
fetch c_clientes into registro_clientes;
EXIT WHEN c_clientes%NOTFOUND;
DBMS_OUTPUT.put_line('EL cliente es: ' ||registro_clientes.nombre_cliente);
end loop;
close c_clientes;
end;
FOR
declare
cursor c_clientes is
select * from clientes;
begin
for i in c_clientes loop
DBMS_OUTPUT.put_line('EL cliente es: ' || i.nombre_cliente);
end loop;
end;
CURSORES
WHILE LOOP
declare
cursor c_clientes is
select * from clientes;

registro_clientes c_clientes%rowtype;
begin
open...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Trigger y cursores oracle
  • cursores
  • Cursores
  • ORACLE
  • Oracle
  • Oracle
  • oracle
  • Oracle

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS