Skip to content

CONCAT

  • str1: This is the first string value. It is this parameter where the concatenation procedure starts.
  • str2: This is the second string value. This parameter is appended to the end of the first string (str1).
  • …, strn: These represent any number of additional string values, which are appended in order to the end of the previously concatenated string. The CONCAT function accepts any number of parameters greater than zero.
SELECT CONCAT('Hello', ' ', 'World') AS Greeting;
+-----------+
| Greeting |
+-----------+
|Hello World|
+-----------+

The CONCAT function in MySQL concatenates two or more strings into one. In the provided example, ‘Hello’ and ‘World’ are concatenated with a space between them to form ‘Hello World’. The result of this concatenation is titled ‘Greeting’.