PostgreSQL · Function
string_agg
string_agg joins non-null values into one string, placing a delimiter between values. Use an ORDER BY clause inside the aggregate when the order must be controlled.
Last updated
Syntax
string_agg(value text, delimiter text) → text
string_agg(value bytea, delimiter bytea ORDER BY input_sort_columns) → byteaIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
array_aggxmlaggORDER BYCOALESCE