Convert comma separated string to array in PL/SQL

Suvonkar picture Suvonkar · Sep 29, 2010 · Viewed 185.2k times · Source

How do I convert a comma separated string to a array?

I have the input '1,2,3' , and I need to convert it into an array.

Answer

Richard Sylvester picture Richard Sylvester · Jan 27, 2015

here is another easier option

select to_number(column_value) as IDs from xmltable('1,2,3,4,5');