CONCAT in mysql

By | January 18, 2014

concat function is used to concatenate two strings.

See the example

Select * from mydoubts_data

————————————-
|id | jobid | name | salary | age|
————————————-
|1 | 121 | vasanthan| 2000 |32 |
|2 | 122 | John | 3000 |28 |
|3 | 123 | Kiran | 3400 |24 |
|4 | 154 | Raju | 2800 |38 |
|5 | 155 | Raju | 2906 |40 |
|6 | 143 | Kiran | 3400 |42 |

Select concat(id,jobid,name,salary,age) from mydoubts_data

————————————-
|id | jobid | name | salary | age|
————————————-
|1121vasanthan200032
|2122John300028
|3123Kiran340024
|4154Raju280038
|5155Raju290640
|6143Kiran340042