This article explains the MySQL string functions which are used to concatenate two or more strings.
1. CONCAT : CONCAT() function is used to generate a string by concatenating two or more strings. The function take one or more strings as arguments and returns a string after concatenating the arguments.
Syntax :CONCAT(string1, string2,)
The function requires at least one parameter, otherwise it generate error.
If arguments are not in binary form, the result also the nonbinary string.
If any argument contains a binary string, than result also a binary string.
The numeric type argument is convert into its equivalent nonbinary string.
With any NULL argument, the function also return NULL
2. CONCAT_WS : CONCAT_WS() also known as Concatenate With Separator is another form of CONCAT() function to concatenate strings with separator. The first argument string is used as separator for other arguments. The separator string is added between strings to concatenate them.The separator can also be a string, if separator is NULL the function also return NULL.