您可以使用split函数将字符串转换为数组,然后UNNEST将数组转换为行。例如:
UNNEST
WITH t AS ( SELECT 'row1,row2,row3' AS data ) SELECT value FROM t CROSS JOIN UNNEST(split(t.data, ',')) as x(value)
value ------- row1 row2 row3 (3 rows)