The [collation specifications](#label-collation_specification) of all input arguments must be compatible.
The collation of the result of the function is the highest-[precedence](#label-determining-the-collation-used-in-an-operation) collation of the inputs.
+----------------------------------------+|CONCAT('GEORGE WASHINGTON ','CARVER')||----------------------------------------|| George Washington Carver |+----------------------------------------+
Concatenate five strings, using session variables
for three of them:
SET var_first_name ='George';SET var_middle_name ='Washington';SET var_last_name ='Carver';SELECTCONCAT($var_first_name,' ',$var_middle_name,' ',$var_last_name)AS concat_name;
+--------------------------+| CONCAT_NAME ||--------------------------|| George Washington Carver |+--------------------------+
Concatenate two VARCHAR columns. First, create a table and insert data:
+--------------------------------------------------------------------+|'THIS '||'IS '||'ANOTHER '||'CONCATENATION '||'TECHNIQUE.'||--------------------------------------------------------------------|| This is another concatenation technique.|+--------------------------------------------------------------------+