create or replace function function_demo RETURN emp
            PIPELINED as
    Type ref_cur_emp IS REF CURSOR RETURN emp%RowType;
    cur_emp ref_cur_emp;
    rec_emp cur_emp%RowType;
begin
    Open cur_emp For
        select * from emp t;
    Loop
        fetch cur_emp
            InTo rec_emp;
        Exit When cur_emp%NotFound;
        PIPE ROW(rec_emp);
    End Loop;
    Close cur_emp;
end function_demo;

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
  • 2022-02-07
  • 2022-12-23
  • 2022-02-23
  • 2021-11-03
猜你喜欢
  • 2021-08-29
  • 2021-09-02
  • 2021-07-08
  • 2022-12-23
  • 2021-08-21
  • 2022-12-23
  • 2021-08-05
相关资源
相似解决方案