Advertisement
Maks140888

Untitled

Jun 1st, 2022
816
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.42 KB | None | 0 0
  1.  
  2. CREATE TYPE objects_below IS TABLE OF VARCHAR2(200);
  3.  
  4. create or replace function find_objects_below(obj_x VARCHAR2)
  5. return objects_below as object_name  objects_below;
  6. begin
  7.     select name
  8.     bulk collect into object_name
  9.     FROM objects
  10.     START WITH objects.name = obj_x
  11.     CONNECT by prior object_id = parent_id;
  12.  
  13.     return object_name;
  14. end;
  15.  
  16. select * from  table(find_objects_below('розклад'));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement