Is it possible to concatenate elements of 2 arrays in the correct order of its elements?
Example:
array1=['a','b','c']
array2=['d','e','f']
concatenated_array=['ad','be','cf']
My data is in the following way:
id col1 col2
1 ['a','b','c'] ['d','e','f']
2 ['g','h','i'] ['j','k','l']
3 ['a','b','c'] ['j','k','l']
select coalesce(x||y,x,y) from unnest('{1,null,3}'::varchar[], '{a,b}'::varchar[]) t(x,y);