What is Array_To_String function in PostgreSQL?

 Posted by Niladri.Biswas on 4/29/2013 | Category: PostgreSQL Interview questions | Views: 2065 | Points: 40
Answer:

This functions concatenates an array element to a string provided the join string is supplied. It returns a string.

Syntax :Array_To_String(Array,join string)

e.g.

Select Array_To_String(ARRAY['Hello','World','Today','I','am','learning','Array_To_String','It','is','very','cool'], ' ')
/* Result */
array_to_string
----------------
"Hello World Today I am learning Array_To_String It is very cool"


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response