Table functions Oracle provides equivalents for the following elements of this
feature:
■ is supported using
CAST (MULTISET (
) AS table type>)
■
is supported using the TABLEoperator in the FROM clause with a varray or nested table as
the argument.
■ is equivalent to an Oracle
expression resulting in a varray or nested table.
■ is equivalent to a PL/SQL function that
returns a nested table.
CREATE TYPE phone AS TABLE OF NUMBER;
CREATE TYPE phone_list AS TABLE OF phone;
WITH t AS (SELECT ROWNUM AS col FROM dual CONNECT BY LEVEL <= 10)
SELECT * FROM TABLE(cast(MULTISET(SELECT * FROM t) AS phone))
SQL> WITH t AS (SELECT ROWNUM AS col FROM dual CONNECT BY LEVEL <= 10)
2 SELECT * FROM TABLE(cast(MULTISET(SELECT * FROM t) AS phone))
3 /
COLUMN_VALUE
------------
1
2
3
4
5
6
7
8
9
10
10 rows selected
SQL>
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/8520577/viewspace-756130/
,如需转载,请注明出处,否则将追究法律责任。
曾从事java方向开发多年。近年已经转入数据库方向。主要擅长SQL优化,Oracle数据库问题诊断,Oracle备份与恢复等。服务于医药物流,医院等行业
注册时间:2010-01-26