mysql 字段拼接

 

mysql> select concat(name,"**",id) as test from test;
+----------------+
| test           |
+----------------+
| xiaoming**1    |
| xiaohong**2    |
| xiaohong**3    |
| xiaohong**4    |
| xiaohong**5    |
| xiaoming**6    |
| xiaoming**7    |
| xiaoming**8    |
| xiaobai**9     |
| 1.2xiaobai**10 |
| 2.2xiaobai**11 |
| 3xiaobai**12   |
| 123xiaohei**13 |
| xiaohei**14    |
| xiaohei**15    |
| .12xiaohei**16 |
+----------------+
16 rows in set (0.01 sec)

 

 

 

posted @ 2019-08-06 01:40  anobscureretreat  阅读(1030)  评论(0编辑  收藏  举报