Used with table functions
This operation was introduced in Oracle 8.1.5
This operation is implemented in the following versions
|
This example was developed using Oracle 9.2.0.1 on Windows 2000
This example requires the following type and function definitions
CREATE OR REPLACE TYPE ty1 AS TABLE OF NUMBER; / CREATE OR REPLACE FUNCTION f1 RETURN ty1 AS l_ty1 ty1 := ty1 (); BEGIN l_ty1 (1) := 1; l_ty1 (2) := 2; RETURN l_ty1; END; /
The statement
SELECT * FROM TABLE (CAST (f1 AS ty1));
generates the following execution plan
0 SELECT STATEMENT Optimizer=CHOOSE 1 0 COLLECTION ITERATOR (PICKLER FETCH)