postgresql get the nth element from comma separated list Edit

Murugan Andezuthu Dharmaratnam | 25 February 2022 | 323

How to get the nth element from comma-separated list in postgresql

Solution

below query returns the 5th element from comma separated liste

select split_part('hello, world, this, is, a, test',',',5)