Postgresql concat string null problem solution Topics List

Postgresql concat string null problem solution

In postgres string||null is null,so better try to use array_to_string function from null value,the following example used to concat 3 columns
SELECT ARRAY_TO_STRING(ARRAY[col1, col2, col3], ' ') AS al_name FROM table_name;