mysql 实现拼接表中的字段
mysql> select id,username,concat( id, '-' , username) as truename from pri_admins; +----+----------+----------+ | id | username | truename | +----+----------+----------+ | 1 | admin | 1-admin | | 3 | lanzhe | 3-lanzhe | | 4 | erin | 4-erin | | 5 | zlw | 5-zlw | | 6 | gjy | 6-gjy | +----+----------+----------+ 5 rows in set (0.00 sec)
转自:https://blog.csdn.net/q718330882/article/details/37690677
版权声明:本文由“憨小猪”发布,如需转载请注明出处。