concat function mysql

Returns the string that results from concatenating the arguments. May have one or more arguments. See the following example :

Basic table structure :

mysql> select * from newrecords;
+--------+-------+
| Name   | Class |
+--------+-------+
| Rikita | ME    |
| John   | MS    |
| John   | MS    |
+--------+-------+
3 rows in set (0.00 sec)

Appending arguments at start of string :

mysql> update newrecords set Class=CONCAT('abc',Class) where name='Rikita';
Query OK, 1 row affected (0.03 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> select * from newrecords;
+--------+-------+
| Name   | Class |
+--------+-------+
| Rikita | abcME |
| John   | MS    |
| John   | MS    |
+--------+-------+
3 rows in set (0.00 sec)

Appending arguments at the end of string :

mysql> update newrecords set Class=CONCAT(Class,'xyz') where name='Rikita';
Query OK, 1 row affected (0.03 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> select * from newrecords;
+--------+----------+
| Name   | Class    |
+--------+----------+
| Rikita | abcMExyz |
| John   | MS       |
| John   | MS       |
+--------+----------+
3 rows in set (0.00 sec)