How do I get the index of VARRAY items after converting to a table

后端 未结 3 1746
粉色の甜心
粉色の甜心 2021-01-14 01:57

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条回答
  •  天命终不由人
    2021-01-14 02:20

     select t1, row_number() over ( partition by t1 order by t1), t2.* from
     (select 'X' as t1 from dual UNION select 'Y' from dual) t1,
     table (sys.odcivarchar2list('a', 'b', 'c'))             t2;
    

提交回复
热议问题