Wednesday, October 21, 2015

BULK COLLECT

create or replace function test_bulk
return varchar2 is

  TYPE id_type          IS TABLE OF test1.id%TYPE;
  TYPE description_type IS TABLE OF test1.description%TYPE;
 
  t_id           id_type;
  t_description  description_type;
BEGIN
  SELECT id, description
  BULK COLLECT INTO t_id, t_description FROM test1;
return t_description;
END;
/

No comments:

Post a Comment