Comma-separated values of a column
suggest changeSELECT
string_agg(T.<COLUMN_NAME>, ',')
FROM
<SCHEMA_NAME>.<TABLE_NAME> T
string_agg is an aggregate, so group the other selected columns. It skips nulls. Order inside the list is unspecified unless you add ORDER BY inside string_agg.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents