Notas
cursor and record_cursor for loop_passing cursor btw procedures and function
Conteúdo das notas (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 ;
Informações
- Descrição
- beginner oracle- PLSQL Notas sobre cursor and record_cursor for loop_passing cursor btw procedures and function, criado por Souravi Sinha em 27-02-2016.
- Criado por
- Souravi Sinha
- Visualizações
- 8
- Tags
- Avaliação