Is Table Unnecessary for Pipelined Function Mustafa, 2025-04-05 Hello everyone, What a busy year. I couldn’t find time to write something and so much is happening, AI models, Quantum etc. So I want to write more now. I know that many people think that blogging is dead but I don’t share this thought because AI is still not perfect makes so many mistakes. An actual experience is still more trustworthy than anything. So, I will keep posting 🙂 Let’s start with something small. As many of you know TABLE() clause is not necessary for pipelined functions anymore. you can write directly pipelined functions or Arrays (nested table / varray). these statements are equal: select * from table(sys.odcinumberlist(1,2,3,4)); select * from sys.odcinumberlist(1,2,3,4); 123 select * from table(sys.odcinumberlist(1,2,3,4)); select * from sys.odcinumberlist(1,2,3,4); both queries will return 4 rows but this doesn’t mean that table clause is unnecessary even so it is necessary for some cases: declare x_array sys.odcinumberlist := sys.odcinumberlist(1,2,3,4); x_count number; begin select count(*) into x_count from x_array; end; / PL/SQL: ORA-00942: table or view does not exist 123456789 declare x_array sys.odcinumberlist := sys.odcinumberlist(1,2,3,4); x_count number;begin select count(*) into x_count from x_array;end;/ PL/SQL: ORA-00942: table or view does not exist when you use a plsql variable as data source, Oracle will think that it is an actual table name first. for this case you must use TABLE clause: declare x_array sys.odcinumberlist := sys.odcinumberlist(1,2,3,4); x_count number; begin select count(*) into x_count from table(x_array); end; / PL/SQL procedure successfully completed. 123456789 declare x_array sys.odcinumberlist := sys.odcinumberlist(1,2,3,4); x_count number;begin select count(*) into x_count from table(x_array);end;/ PL/SQL procedure successfully completed. peace. 19c 21c 23ai 19c21c23ai