複数行を1行にまとめる、1行を複数行にばらす(PostgreSQL)
1行にまとめる
select array_to_string(array(select id from t01_articles where parent_id = '19343206'), ',')
カンマで結合している。
複数行にばらす
select regexp_split_to_table('東京,埼玉,奈良', ',')
カンマでsplitしている。
select array_to_string(array(select id from t01_articles where parent_id = '19343206'), ',')
カンマで結合している。
select regexp_split_to_table('東京,埼玉,奈良', ',')
カンマでsplitしている。