Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Oracle, what does [select * from table()] mean?

Tags:

sql

oracle

plsql

I am trying to search for information on this topic in sql but search is not showing me results.

SELECT * FROM TABLE(package/procedure/function);

Which topic does the above sql statement come under? Can I have a link to a doc?

like image 518
R-K Avatar asked Apr 15 '19 14:04

R-K


1 Answers

The TABLE collection expression is described here in the Oracle documentation.

In short, it is used to convert a collection or pipelined function into a table that can be queried by a SELECT statement.

Typically, the collection must be of a datatype that is defined at the database level (i.e. a datatype that was created by a create or replace type ... statement).

e.g.

select *
from   table(sample_pkg.func_that_rtrns_array);
like image 191
Boneist Avatar answered Oct 07 '22 00:10

Boneist