I am using postgresql 9.0
I am wonder if its possible to concatenate three attributes together.
this is how I concatenate two attributes (book & the comma):
SELECT string_agg(book, ',') FROM authors where id = 1;
| book1,book2,book3|
--------------------
how can I do something like below:
SELECT string_agg(name, ':', book, ',') FROM authors where id = 1;
| Ahmad: book1,book2,book3|
----------------
can some one help? thanks.