Yue Yue - 3 months ago 18
SQL Question

How do I treat a special string as an array and select the second object from it in postgreSQL

I have a column in my table which has values like this




Data are splitted by ";"

I want to select the second value of it. My thought is to find a way to treat this string as an array... Or is there a better way?

Please help, thanks!


you can use select split_part(colname,';',2);