Apuntes
cursor and record_cursor for loop_passing cursor btw procedures and function
Contenido del apunte (1)
Página 1
cursor and record
AS
cursor C is select names from sales where c_id=order_id;
c_record C%rowtype;
Begin
cursor for loop(no declaration statement for cursor or record is needed, and no opening and closing of cursor)
For c_var in (select names from sales where c_id=order_id)
loop
dbms_output.put_line('sales date'|| c_var.sales_date);
End loop;
passing cursor btw procedures and function
create or replace funtion get_names(
c_id IN number)
Return SYS_REFCURSOR
as
1_return SYS_REFCURSOR;
begin
open 1_return for (select names from sales where c_id=order_id);
return 1_return;
End ;
Información
- Descripción
- beginner oracle- PLSQL Apunte sobre cursor and record_cursor for loop_passing cursor btw procedures and function, creado por Souravi Sinha el 27/02/2016.
- Creado por
- Souravi Sinha · feb 2016
- Actualizado
- 10 ago 2016
- Visitas
- 8
- Etiquetas
- Valoración