需要将Table1 Col1值插入Table2 Col1:
输入:
Table1 Col1 1,2,3,4
输出:
Table2 Col1 1 2 3 4
使用regexp_split_to_table():
regexp_split_to_table()
select val from table1 t1 cross join lateral regexp_split_to_table(t1.col1, ',') val;