mysql field splicing

 

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 is    | 
| 123xiaohei ** 13 is | 
| xiaohei ** 14     | 
| xiaohei ** 15     | 
| .12xiaohei ** 16 | 
+ ---- + ----------------------- 16 rows in SET ( 0.01 sec)
 

 

 

 

Guess you like

Origin www.cnblogs.com/sea-stream/p/11306593.html