How to add two or more strings in MySQL?


A string function called CONCAT() is used to concatenate two or more strings as a single string in MySQL.

Syntax

CONCAT(String1,String2,…,StringN)

Here, the arguments of CONCAT functions are the strings which need to be concatenated as a single string.

Example

mysql> Select CONCAT('Ram','is','a','good','boy') AS Remarks;

+---------------+
| Remarks       |
+---------------+
| Ramisagoodboy |
+---------------+

1 row in set (0.00 sec)

Updated on: 20-Jun-2020

673 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements