What is Concat function in Denali? Explain with example.

 Posted by Niladri.Biswas on 7/12/2012 | Category: Sql Server Interview questions | Views: 1263 | Points: 40

As the name suggests, it concatenates strings. In earlier versions of Sql Server we have the option of performing concatenation using the '+' symbol. But the overhead was that if the types that are participating in the concatenation are not of varchar type, then we had to do explicit conversion else it was resulting in error. However, the new Concat() function takes care of this explicit conversion.


Select Concat('Sql',12, Null, 'Code Name', ' Denali') As [MultipleField Concat]

/* Output
MultipleField Concat
Sql12Code Name Denali

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response