Create or replace function f(v_input nvarchar2)
Return t_table
Is
v_table t_table;
BEGIN
Select id bulk collect into v_table from table1 where "USER"=v_input ;
Return v_table;
End;
/
Select * from table2 where id in (select * from table(f(‘abc’)));
How to implement this using pipelined table functions in oracle 19.0 using limit clause with bulk collect to reduce the memory usage and improve performance?
If not pipelined functions what else can we use?
A simple pipelined function is:
or if you want to use a cursor and process the
ids in bulk:Then you can use:
db<>fiddle here