User Tools

Site Tools


kurs:pipelined_functions_in_packages_mit_table_of_record_return
CREATE OR REPLACE 
PACKAGE return_recordtable
  IS

  cursor c_emp(c_p_salary number) is
    select first_name, last_name, salary fullname from emp
    where salary < c_p_salary;

  type t_emp is table of c_emp%rowtype;
  
  FUNCTION MAX_SALARY_PIPE
    ( p_sal_max IN number)
    RETURN t_emp pipelined ;  
END; -- Package spec
/


CREATE OR REPLACE 
PACKAGE BODY return_recordtable
IS

FUNCTION MAX_SALARY_PIPE
  ( p_sal_max IN number)
  RETURN t_emp pipelined IS
      
BEGIN 
  for r in c_emp(p_sal_max) loop
      pipe row(r);
  end loop;
END;
END;
/
kurs/pipelined_functions_in_packages_mit_table_of_record_return.txt · Last modified: 2014/09/10 21:22 (external edit)