In the following example I create a VARRAY with 3 items.
TEST@XE> select t1, t2.* from
2 (select 'X' as t1 from dual UNION select 'Y' from dual) t1,
3 table (sys.odcivarchar2list('a', 'b', 'c')) t2;
T1 COLUMN_VALUE
--- --------------------
X a
X b
X c
Y a
Y b
Y c
I'd like to have the following output:
T1 INDEX COLUMN_VALUE
--- ----- --------------------
X 1 a
X 2 b
X 3 c
Y 1 a
Y 2 b
Y 3 c
Note that sys.odcivarchar2list
is predefined as VARRAY(32767) OF VARCHAR2(4000);
.